diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1Controller.js b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1Controller.js index ba2d5315..6555edf7 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1Controller.js +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1Controller.js @@ -74,6 +74,28 @@ $scope.editing.antecentesOcupacionaisAcidentesTrabalho = []; $scope.editing.antecentesOcupacionaisDoencasProfissionais = []; $scope.editing.antecentesOcupacionaisActividadesAnteriores = []; + + $scope.editing.actividade = { + posto_representa_risco_saude: false + }; + + $scope.editing.antecentesOcupacionais = { + exposto_factores_risco: false, + acidentes_trabalho: false, + doencas_profissionais: false, + doencas_relacionadas_com_trabalho: false + }; + + //TODO: remaining fields!!! + $scope.editing.exameObjectivo = { + boca_nariz_normal: true, + pele_mucosas_normal: true, + acuidade_auditiva_normal: true + }; + + $scope.editing.classificacaoIndividualSaude = { + sem_problemas_saude: true + }; }; $scope.edit = function(selected){ @@ -208,9 +230,39 @@ } } - array.splice(index, 1); + array.splice(index, 1); } }; + + $scope.gridClearItems = function(tableId, arrayName){ + + if(angular.isArray($scope.editing[arrayName])) + { + $scope.editing[arrayName] = new Array(); + + var table = $scope.domEl.find('#' + tableId); + + if(table.length > 0){ + + var trs = $(table[0]).find('tr[class="ng-scope"]'); + + $.each(trs, function(index, trEl) { + + var inputs = $(trEl).find('input[data-required="true"]'); + + $.each(inputs, function(index, inputEl) { + + var input = $(inputEl); + + //disable field validation + $scope.editForm.$removeConstraints(input, true); + }); + }); + } + + $scope.editing[arrayName] = new Array(); + } + }; $scope.cancel = function(){ @@ -296,6 +348,28 @@ } }); + $scope.classificacaoIndividualSaude = function(selected){ + + if (selected && $scope.editing.classificacaoIndividualSaude.sem_problemas_saude) + { + $scope.editing.classificacaoIndividualSaude.alteracao_temporaria_saude = false; + $scope.editing.classificacaoIndividualSaude.doenca_cronica_sem_interferencia = false; + $scope.editing.classificacaoIndividualSaude.doenca_cronica_com_interferencia = false; + $scope.editing.classificacaoIndividualSaude.doenca_profissional = false; + $scope.editing.classificacaoIndividualSaude.incapacidade_parcial = false; + $scope.editing.classificacaoIndividualSaude.incapacidade_total = false; + $scope.editing.classificacaoIndividualSaude.parecer_em_estudo = false; + } + + if(selected && !$scope.editing.classificacaoIndividualSaude.sem_problemas_saude){ + $scope.editing.classificacaoIndividualSaude.sem_problemas_saude = true; + } + + if(!selected){ + $scope.editing.classificacaoIndividualSaude.sem_problemas_saude = false; + } + }; + $scope.$on('afterrender', function(event, args){ //listeners diff --git a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1View.html b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1View.html index dd7ff107..033ca5eb 100644 --- a/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1View.html +++ b/trunk/SiprpWebFichasClinicas/WebContent/static/html/app/Form1/Form1View.html @@ -559,7 +559,7 @@
| Factores e Risco | @@ -667,7 +667,7 @@ Sim @@ -675,7 +675,7 @@ -|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Acidente | @@ -721,11 +721,11 @@
|---|
| Suspeitas (código) | @@ -765,7 +765,7 @@
- |
@@ -788,7 +788,7 @@
-
|---|
| Doença | -Pai | -Mãe | -Irmãos | -Avós | -Outros | -
|---|---|---|---|---|---|
| Infecciosas | -- - | -- - | -- - | -- - | -
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 7 - Exame Objectivo+
+ 7.1 - Biometria
+
+
+
+
+
+
+
+
-
+
+ (Kg)
|
-
| Neoplasias | -- - | -- - | -- - | -- - | -
-
-
-
+
+
+
+
+
+
-
-
+
-
+
+ (mmHg)
|
-
| Dças. GI. Endocrinas, Nutrição, Metabolismo, Imunitárias | -- - | -- - | -- - | -- - | -
-
-
+
-
-
-
-
+
+
+
+
+
+
-
+
+ (cm)
|
-
| Doeças Sangue e Orgãos Hemotopoieticos | -- - | -- - | -- - | -- - | -
-
-
-
-
-
-
+
+
+
+
+
-
+
+ (bpm)
|
-
| Transtornos Mentais | -- - | -- - | -- - | -- - | -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
+
-
-
-
- |
-
| Doenças SNC e Orgãos Sentidos | -- - | -- - | -- - | -- - | -
-
-
-
-
-
-
-
-
- |
-
| Doenças Aparelho Circulatório | -- - | -- - | -- - | -- - | -
-
-
-
-
-
-
-
-
- |
-
| Doenças Aparelho Respiratório | -- - | -- - | -- - | -- - | -
-
-
-
-
-
-
-
-
- |
-
| Doenças Aparelho Digestivo | -- - | -- - | -- - | -- - | -
-
-
-
-
-
-
-
-
- |
-
| Doenças Aparelho Génito - Urinário | -- - | -- - | -- - | -- - | -
-
-
-
-
-
-
-
-
- |
-
| Complicações da Gravidez e Puerpério | -- - | -- - | -- - | -- - | -
-
-
-
-
-
-
-
-
- |
-
| Doenças Pele e Tec. Celular Subcutâneo | -- - | -- - | -- - | -- - | -
-
-
-
-
-
-
-
-
- |
-
| Doenças Sist. Osteomuscular e Tec. Conjuntivo | -- - | -- - | -- - | -- - | -
-
-
-
-
-
-
-
-
- |
-
| Anomalias Congénitas | -- - | -- - | -- - | -- - | -
-
-
-
-
-
-
-
-
- |
-
| Sintomas, Sinais e Afecções mal definidas | -- - | -- - | -- - | -- - | -
-
-
-
-
-
-
-
-
- |
-
| Lesões, Acidentes e Envenenamentos | -- - | -- - | -- - | -- - | -
-
-
-
-
-
-
-
-
- |
-
| - | Perto | -Longe | -
|---|---|---|
| Olho Esquerdo | -- - | -- - | -
| Olho Direito | -- - | -- - | -
| + | Perto | +Longe | +
|---|---|---|
| Olho Esquerdo | ++ + | ++ + | +
| Olho Direito | ++ + | ++ + | +