<?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.paciente</id>
	<name>Módulo de Pacientes</name>
	<description>Módulo para gerenciamento de pacientes</description>
	
	<sources>
		<source id="paciente">
			<bdTable>msp_paciente</bdTable>
			<fields>
				<field id="id" datatype="id" name="Id" primaryKey="1" inputType="hidden" />
				
				<field id="nome" 		datatype="string" name="Nome Completo" primaryName="1" required="1" />
				<field id="nascimento" 	datatype="date" name="Nascimento" required="1" />
				<field id="sexo" 		datatype="string" name="Sexo" required="1" />
				<field id="cor" 		datatype="string" name="Cor" required="1"/>
				<field id="profissao" 	datatype="string" name="Profissão" required="0" />
				
				<field id="estadocivil" datatype="string" name="Estado Civil" required="1" />
				<field id="identidade" 	datatype="string" name="Identidade" validationType="rg" required="1" />
				<field id="cpf" 		datatype="string" name="CPF" validationType="cpf" required="1" />
				<field id="cartaosus"	datatype="string" name="Cartão Sus" required="0" />
				<field id="naturalidade" datatype="string" name="Naturalidade" required="1" />
				<field id="nacionalidade" datatype="string" name="Nacionalidade" required="1" />
				
				<field id="nomepai" 	datatype="string" name="Nome do Pai" required="1" />
				<field id="nomemae" 	datatype="string" name="Nome da Mãe" required="1" />
				
				<field id="endereco" 	datatype="string" name="Endereço" required="1" />
				<field id="estado" 		datatype="string" name="Estado" required="1" />
				<field id="municipio" 	datatype="string" name="Município" required="1" />
				<field id="cep" 		datatype="string" name="Cep" validationType="cep" required="1" />
				<field id="telefone" 	datatype="string" name="Telefone" validationType="telefone" required="1" />
				<field id="celular" 	datatype="string" name="Celular" validationType="telefone" required="1" />
				
				<field id="gruposangue" datatype="string" name="Grupo Sanguíneo" required="0" />
				<field id="rh" 			datatype="string" name="RH" required="0" />
				
				<field id="dataregistro" datatype="date" name="Data de Registro" required="1" />
			</fields>
		</source>
	</sources>
	
	<configs>
		<workflow>0</workflow>
		<imageRepository>0</imageRepository>
	</configs>
	
	<interfaces>
		
		<interface id="add" name="Adicionar" systemReference="bgsAdd" source="paciente">
			<configuration>
				<render renderable="1"/>
				<action actionable="1" actionMethod="add" />
				<popUp width="800" height="500" />
			</configuration>
			<styles>
				<style path="src/modulos/paciente/style/add.php" id="add"/>
			</styles>
			<acessGroups>
				<acessGroup id="50d7e9e13ec32fb152f433a21b01879e" allowRender="1" name="Administrador" />
			</acessGroups>
		</interface>
	
		<interface id="view" name="Visualizar" systemReference="bgsLista" source="paciente">
			<configuration>
				<render renderable="1" renderMethod="build" />
				<action actionable="0" actionMethod="" />
				<popUp width="800" height="500" />
			</configuration>
			<styles>
				<style path="src/modulos/paciente/style/view.php" id="view"/>
			</styles>
			<acessGroups>
				<acessGroup id="50d7e9e13ec32fb152f433a21b01879e" allowRender="1" name="Administrador" />
			</acessGroups>
		</interface>
		
		<interface id="printaih" name="Impressão SUS" systemReference="bgsLista" source="paciente">
			<configuration>
				<render renderable="1" renderMethod="build" />
				<action actionable="0" actionMethod="" />
				<popUp width="800" height="500" />
			</configuration>
			<styles>
				<style path="src/modulos/paciente/style/printaih.php" id="printaih"/>
			</styles>
			<acessGroups>
				<acessGroup id="50d7e9e13ec32fb152f433a21b01879e" allowRender="1" name="Administrador" />
			</acessGroups>
		</interface>
		
		<interface id="printsus" name="Impressão SUS" systemReference="bgsLista" source="paciente">
			<configuration>
				<render renderable="1" renderMethod="build" />
				<action actionable="0" actionMethod="" />
				<popUp width="800" height="500" />
			</configuration>
			<styles>
				<style path="src/modulos/paciente/style/printsus.php" id="printsus"/>
			</styles>
			<acessGroups>
				<acessGroup id="50d7e9e13ec32fb152f433a21b01879e" allowRender="1" name="Administrador" />
			</acessGroups>
		</interface>
		
		<interface id="printmissao" name="Impressão SUS" systemReference="bgsLista" source="paciente">
			<configuration>
				<render renderable="1" renderMethod="build" />
				<action actionable="0" actionMethod="" />
				<popUp width="800" height="500" />
			</configuration>
			<styles>
				<style path="src/modulos/paciente/style/printmissao.php" id="printmissao"/>
			</styles>
			<acessGroups>
				<acessGroup id="50d7e9e13ec32fb152f433a21b01879e" allowRender="1" name="Administrador" />
			</acessGroups>
		</interface>
		
		<interface id="printlaqueadura" name="Impressão Laqueadura" systemReference="bgsLista" source="paciente">
			<configuration>
				<render renderable="1" renderMethod="build" />
				<action actionable="0" actionMethod="" />
				<popUp width="800" height="500" />
			</configuration>
			<styles>
				<style path="src/modulos/paciente/style/laqueadura.php" id="laqueadura"/>
			</styles>
			<acessGroups>
				<acessGroup id="50d7e9e13ec32fb152f433a21b01879e" allowRender="1" name="Administrador" />
			</acessGroups>
		</interface>
		
		<interface id="printconsentimento" name="Impressão Laqueadura" systemReference="bgsLista" source="paciente">
			<configuration>
				<render renderable="1" renderMethod="build" />
				<action actionable="0" actionMethod="" />
				<popUp width="800" height="500" />
			</configuration>
			<styles>
				<style path="src/modulos/paciente/style/consentimento.php" id="consentimento"/>
			</styles>
			<acessGroups>
				<acessGroup id="50d7e9e13ec32fb152f433a21b01879e" allowRender="1" name="Administrador" />
			</acessGroups>
		</interface>
		
		<interface id="update" name="Atualizar" systemReference="bgsUpdate" source="paciente">
			<configuration>
				<render renderable="1" renderMethod="build" />
				<action actionable="1" actionMethod="update" />
				<popUp width="800" height="500" />
			</configuration>
			<styles>
				<style path="src/modulos/paciente/style/update.php" id="update"/>
			</styles>
			<acessGroups>
				<acessGroup id="50d7e9e13ec32fb152f433a21b01879e" allowRender="1" name="Administrador" />
			</acessGroups>
		</interface>
		
		<interface id="delete" name="Excluir" systemReference="bgsDelete" source="paciente">
			<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="paciente" systemReference="bgsAdministration" default="1">
			<fields>
				<field id="nome" />
				<field id="nascimento" />
				<field id="nomemae" />
			</fields>
			<configuration>
				<render renderable="true" renderMethod="listarAdm"/>
				<action actionable="false"/>
			</configuration>
			<sort>
				<sort by="dataregistro" order="desc"/>
			</sort>
			<styles>
				<style path="src/modulos/paciente/style/administration.php" id="administration"/>
			</styles>
			<buttons>
				<button id="add" name="Adicionar" type="newpop" action="default" />
				<button id="view" name="Visualizar" type="pop" action="paciente.view" />
				<button id="update" name="Editar" type="pop" action="default" />
				<button id="printmissao" name="Imp. Missão" type="pop" action="paciente.printmissao&amp;print=1" />
				<button id="printsus" name="Imp. SUS" type="pop" action="paciente.printsus&amp;print=1" />
				<button id="printaih" name="Imp. AIH" type="pop" action="paciente.printaih&amp;print=1" />
				<button id="laqueadura" name="Imp. Laqueadura" type="pop" action="paciente.printlaqueadura&amp;print=1" />
				<button id="printconsentimento" name="Imp. Consentimento" type="pop" action="paciente.printconsentimento&amp;print=1" />
				<button id="delete" name="Excluir" type="action" action="default" />
			</buttons>
			<acessGroups>
				<acessGroup id="50d7e9e13ec32fb152f433a21b01879e" allowRender="1" name="admin" />
			</acessGroups>
			<maxRows>30</maxRows>
			<maxPages>10</maxPages>
		</interface>
		
<!--		<interface id="lista" name="Produtos" default="1" systemReference="bgsLista" source="produtoscategoria">-->
<!--			<fields>-->
<!--				<field id="id" />-->
<!--				<field id="name" />-->
<!--				<field id="description" />-->
<!--				<field id="position" />-->
<!--			</fields>-->
<!--			<configuration>-->
<!--				<render renderable="1" renderMethod="lista" />-->
<!--				<action actionable="false"/>-->
<!--			</configuration>-->
<!--			<styles>-->
<!--				<style path="src/modulos/produtoscategorias/style/menu.php" id="menu"/>-->
<!--			</styles>-->
<!--			<acessGroups>-->
<!--				<acessGroup id="50d7e9e13ec32fb152f433a21b01879e" allowRender="1" name="admin" />-->
<!--				<acessGroup id="5f6799edb0a5928d6d8571567c8597d6" allowRender="1" name="registered" />-->
<!--				<acessGroup id="954111ce3e7fcf47747b897c961bc317" allowRender="1" name="guest"/>-->
<!--			</acessGroups>-->
<!--			<maxRows>150</maxRows>-->
<!--			<maxPages>10</maxPages>-->
<!--		</interface>-->
	</interfaces>
</modulo>