<?xml version="1.0" encoding="UTF-8" ?>

<modulo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../config/patterns/xmlschemas/sources_schema.xsd">
	
	<id>msp.far.medicamento</id>
	<name>Módulo de Medicamentos da Farmácia</name>
	<description>Módulo para gerenciar medicamentos da farmácia</description>
	
	<sources>
		<source id="medicamento">
			<bdTable>msp_far_medicamento</bdTable>
			<fields>
				<field id="id" 			datatype="id" 		name="Id" 			primaryKey="1" 	inputType="hidden" />
				<field id="nome" 		datatype="string" 	name="Nome" 		primaryName="1" required="1" />
				<field id="medida" 		datatype="string" 	name="Medida" 		required="1" />
				<field id="grupo" 		datatype="string" 	name="Grupo" 		required="1" />
				<field id="grupolocal"	datatype="string" 	name="Grupo Local"	required="1" />
			</fields>
		</source>
	</sources>
	
	<configs>
		<workflow>0</workflow>
		<imageRepository>0</imageRepository>
	</configs>
	
	<interfaces>
		
		<interface id="add" name="Adicionar" systemReference="bgsAdd" source="medicamento">
			<configuration>
				<render renderable="1"/>
				<action actionable="1" actionMethod="add" />
				<popUp width="600"/>
			</configuration>
			<styles>
				<style path="src/modulos/far_medicamento/style/add.php" id="add"/>
			</styles>
			<acessGroups>
				<acessGroup id="50d7e9e13ec32fb152f433a21b01879e" allowRender="1" name="Administrador" />
			</acessGroups>
		</interface>
	
		<interface id="update" name="Atualizar" systemReference="bgsUpdate" source="medicamento">
			<configuration>
				<render renderable="1" renderMethod="build" />
				<action actionable="1" actionMethod="update" />
				<popUp width="600"/>
			</configuration>
			<styles>
				<style path="src/modulos/far_medicamento/style/update.php" id="update"/>
			</styles>
			<acessGroups>
				<acessGroup id="50d7e9e13ec32fb152f433a21b01879e" allowRender="1" name="Administrador" />
			</acessGroups>
		</interface>
		
		<interface id="delete" name="Excluir" systemReference="bgsDelete" source="medicamento">
			<configuration>
				<render renderable="0" />
				<action actionable="1" actionMethod="delete" />
			</configuration>
			<acessGroups>
				<acessGroup id="50d7e9e13ec32fb152f433a21b01879e" allowRender="1" name="Administrador" />
			</acessGroups>
		</interface>
		
		<interface id="administration" name="Administração" source="medicamento" systemReference="bgsAdministration">
			<fields>
				<field id="nome" />
				<field id="grupo" />
				<field id="grupolocal" />
				<field id="medida" />
			</fields>
			<configuration>
				<render renderable="true" renderMethod="listaAdm"/>
				<action actionable="false"/>
			</configuration>
			<sort>
				<sort by="grupo"/>
				<sort by="grupolocal"/>
				<sort by="nome"/>
			</sort>
			<acessGroups>
				<acessGroup id="50d7e9e13ec32fb152f433a21b01879e" allowRender="1" name="admin" />
			</acessGroups>
			<maxRows>25</maxRows>
			<maxPages>10</maxPages>
		</interface>
	</interfaces>
</modulo>