|
|
|
@ -17,10 +17,8 @@
|
|
|
|
' <li><a href="#section10">Absentismo</a></li>' +
|
|
|
|
' <li><a href="#section10">Absentismo</a></li>' +
|
|
|
|
' <li><a href="#section11">Esquema Vacinal</a></li>' +
|
|
|
|
' <li><a href="#section11">Esquema Vacinal</a></li>' +
|
|
|
|
' <li><a href="#section12">Conclusões/Resumo</a></li>' +
|
|
|
|
' <li><a href="#section12">Conclusões/Resumo</a></li>' +
|
|
|
|
//' <li><a href="#section13"> Propostas de Solução</a></li>' +
|
|
|
|
|
|
|
|
' <li><a href="#section14">Observações</a></li>' +
|
|
|
|
' <li><a href="#section14">Observações</a></li>' +
|
|
|
|
' <li><a href="#section15">Parecer/Reavaliação</a></li>' +
|
|
|
|
' <li><a href="#section15">Parecer/Reavaliação</a></li>' +
|
|
|
|
//' <li><a href="#section16">Reavaliação</a></li>' +
|
|
|
|
|
|
|
|
' <li><a href="#section17">Data do Exame</a></li>' +
|
|
|
|
' <li><a href="#section17">Data do Exame</a></li>' +
|
|
|
|
'</ul> ' +
|
|
|
|
'</ul> ' +
|
|
|
|
'</div>'
|
|
|
|
'</div>'
|
|
|
|
@ -33,13 +31,6 @@
|
|
|
|
$scope.habilitacoes = new globals.dataService.store();
|
|
|
|
$scope.habilitacoes = new globals.dataService.store();
|
|
|
|
$scope.estadosCivis = new globals.dataService.store();
|
|
|
|
$scope.estadosCivis = new globals.dataService.store();
|
|
|
|
|
|
|
|
|
|
|
|
$scope.storeDadosFicha = new globals.dataService.store({
|
|
|
|
|
|
|
|
model: null,
|
|
|
|
|
|
|
|
actions: {
|
|
|
|
|
|
|
|
get: 'getDadosFichaFromBD'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.storeFichasClinicas = new globals.dataService.store({
|
|
|
|
$scope.storeFichasClinicas = new globals.dataService.store({
|
|
|
|
model: null,
|
|
|
|
model: null,
|
|
|
|
actions: {
|
|
|
|
actions: {
|
|
|
|
@ -53,54 +44,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
$scope.editForm.$reset();
|
|
|
|
$scope.editForm.$reset();
|
|
|
|
|
|
|
|
|
|
|
|
$scope.editing = angular.copy(selected);
|
|
|
|
$scope.storeFichasClinicas.extraParams = {
|
|
|
|
|
|
|
|
fichaID: null,
|
|
|
|
$scope.editing.antecentesOcupacionaisActividadesAnteriores = [];
|
|
|
|
trabalhadorID: selected.ficha.trabalhador_id,
|
|
|
|
$scope.editing.antecentesOcupacionaisAcidentesTrabalho = [];
|
|
|
|
tipoFichaID: selected.ficha.tipo_ficha_id
|
|
|
|
$scope.editing.antecentesOcupacionaisDoencasProfissionais = [];
|
|
|
|
|
|
|
|
$scope.editing.antecentesOcupacionaisActividadesAnteriores = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//TODO: rever estes modelos - 3 novas grelhas
|
|
|
|
|
|
|
|
$scope.editing.antecedentesPessoaisCirurgias = [];
|
|
|
|
|
|
|
|
$scope.editing.antecedentesPessoaisFracturas = [];
|
|
|
|
|
|
|
|
$scope.editing.antecedentesPessoaisInternamentos = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$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.storeFichasClinicas.get(function(response, status, headers, config, items){
|
|
|
|
$scope.editing.exameObjectivo = {
|
|
|
|
|
|
|
|
boca_nariz_normal: true,
|
|
|
|
|
|
|
|
pele_mucosas_normal: true,
|
|
|
|
|
|
|
|
acuidade_auditiva_normal: true,
|
|
|
|
|
|
|
|
adenopatias_normal: true,
|
|
|
|
|
|
|
|
pescoco_normal: true,
|
|
|
|
|
|
|
|
torax_normal: true,
|
|
|
|
|
|
|
|
auscultacao_cardiaca_normal: true,
|
|
|
|
|
|
|
|
auscultacao_pulmonar_normal: true,
|
|
|
|
|
|
|
|
mama_normal: true,
|
|
|
|
|
|
|
|
abdomen_normal: true,
|
|
|
|
|
|
|
|
coluna_vertebral_normal: true,
|
|
|
|
|
|
|
|
membros_normal: true,
|
|
|
|
|
|
|
|
exame_neurologico_normal: true
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.editing.classificacaoIndividualSaude = {
|
|
|
|
$scope.selected = items.fichaData;
|
|
|
|
sem_problemas_saude: true
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.editing.conclusoesResumo = {
|
|
|
|
$scope.editing = angular.copy($scope.selected);
|
|
|
|
inapto_radio: 1,
|
|
|
|
|
|
|
|
reavaliacao_radio: 1
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
globals.plugins.buildFloatingSideMenu({
|
|
|
|
globals.plugins.buildFloatingSideMenu({
|
|
|
|
title: 'Ficha Clinica',
|
|
|
|
title: 'Ficha Clinica',
|
|
|
|
@ -116,6 +70,7 @@
|
|
|
|
$scope.openModalDocumentos();
|
|
|
|
$scope.openModalDocumentos();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$scope.edit = function(selected){
|
|
|
|
$scope.edit = function(selected){
|
|
|
|
@ -123,17 +78,17 @@
|
|
|
|
$scope.editForm.$reset();
|
|
|
|
$scope.editForm.$reset();
|
|
|
|
|
|
|
|
|
|
|
|
$scope.storeFichasClinicas.extraParams = {
|
|
|
|
$scope.storeFichasClinicas.extraParams = {
|
|
|
|
fichaID: selected.id
|
|
|
|
fichaID: selected.id,
|
|
|
|
|
|
|
|
trabalhadorID: null,
|
|
|
|
|
|
|
|
tipoFichaID: null
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$scope.storeFichasClinicas.get(function(response, status, headers, config, items){
|
|
|
|
$scope.storeFichasClinicas.get(function(response, status, headers, config, items){
|
|
|
|
|
|
|
|
|
|
|
|
$scope.selected = items;
|
|
|
|
$scope.selected = items.fichaData;
|
|
|
|
|
|
|
|
|
|
|
|
$scope.editing = angular.copy($scope.selected);
|
|
|
|
$scope.editing = angular.copy($scope.selected);
|
|
|
|
|
|
|
|
|
|
|
|
$timeout(function () {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
globals.plugins.buildFloatingSideMenu({
|
|
|
|
globals.plugins.buildFloatingSideMenu({
|
|
|
|
title: 'Ficha Clinica',
|
|
|
|
title: 'Ficha Clinica',
|
|
|
|
scrollspyItems: scrollspyItems,
|
|
|
|
scrollspyItems: scrollspyItems,
|
|
|
|
@ -149,8 +104,6 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
}, 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
@ -169,15 +122,8 @@
|
|
|
|
$scope.editing.ficha.data_conclusao = null;
|
|
|
|
$scope.editing.ficha.data_conclusao = null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//var isNewRecord = $scope.editing.ficha.id == null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.storeFichasClinicas.upsert($scope.selected, $scope.editing, function(response, selected, editing){
|
|
|
|
$scope.storeFichasClinicas.upsert($scope.selected, $scope.editing, function(response, selected, editing){
|
|
|
|
|
|
|
|
|
|
|
|
//if(isNewRecord && response.success)
|
|
|
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
// $scope.isNewRecord = true;
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(response.success && complete)
|
|
|
|
if(response.success && complete)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
globals.plugins.hideFloatingSideMenu();
|
|
|
|
globals.plugins.hideFloatingSideMenu();
|
|
|
|
@ -344,27 +290,15 @@
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$scope.$watch('editing.ficha.tipo_ficha_id', function(tipo_ficha_id, oldVal){
|
|
|
|
$scope.$watch('storeFichasClinicas.items', function(newVal, oldVal){
|
|
|
|
|
|
|
|
|
|
|
|
if(tipo_ficha_id){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.storeDadosFicha.extraParams = {
|
|
|
|
|
|
|
|
tipoFichaID: tipo_ficha_id
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.storeDadosFicha.get(function(response, status, headers, config, items){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(response.data){
|
|
|
|
if(newVal.fieldsData){
|
|
|
|
|
|
|
|
|
|
|
|
if(response.data.habilitacoes){
|
|
|
|
$scope.habilitacoes.items = [];
|
|
|
|
$scope.habilitacoes.loadData(response.data.habilitacoes);
|
|
|
|
$scope.habilitacoes.loadData(newVal.fieldsData.habilitacoes);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(response.data.estadosCivis){
|
|
|
|
$scope.estadosCivis.items = [];
|
|
|
|
$scope.estadosCivis.loadData(response.data.estadosCivis);
|
|
|
|
$scope.estadosCivis.loadData(newVal.fieldsData.estadosCivis);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
@ -390,11 +324,6 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$scope.test = function(){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
alert('888');
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.$on('afterrender', function(event, args){
|
|
|
|
$scope.$on('afterrender', function(event, args){
|
|
|
|
|
|
|
|
|
|
|
|
//listeners
|
|
|
|
//listeners
|
|
|
|
|