|
|
|
@ -4,6 +4,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
$scope.descricao = null;
|
|
|
|
$scope.descricao = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.calculatedAge = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.storeFichasClinicas = new globals.dataService.store({
|
|
|
|
|
|
|
|
model: null,
|
|
|
|
|
|
|
|
actions: {
|
|
|
|
|
|
|
|
get: 'getFichaEAdmissaoInicial',
|
|
|
|
|
|
|
|
upsert: 'sendFichaEAdmissaoInicial',//TODO: ???
|
|
|
|
|
|
|
|
destroy: 'deleteFichaEAdmissaoInicial'//TODO: ???
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$scope.add = function(selected){
|
|
|
|
$scope.add = function(selected){
|
|
|
|
|
|
|
|
|
|
|
|
$scope.editForm.$reset();
|
|
|
|
$scope.editForm.$reset();
|
|
|
|
@ -17,7 +28,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
$scope.editForm.$reset();
|
|
|
|
$scope.editForm.$reset();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.storeFichasClinicas.extraParams = {
|
|
|
|
|
|
|
|
fichaID: selected.id
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.storeFichasClinicas.get(function(response, status, headers, config, items){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.selected = items;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.editing = angular.copy($scope.selected);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
}, 0);
|
|
|
|
}, 0);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
@ -37,7 +57,14 @@
|
|
|
|
$scope.editing.ficha.data_conclusao = null;
|
|
|
|
$scope.editing.ficha.data_conclusao = null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.storeFichasClinicas.upsert($scope.selected, $scope.editing, function(response, selected, editing, isNewRecord){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//TODO: check the need for other keys!!!
|
|
|
|
|
|
|
|
if(response.data)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$scope.editing.ficha.id = response.data.ficha.id;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|