Skip to content

Commit

Permalink
Merge pull request #387 from esaude/develop
Browse files Browse the repository at this point in the history
SESP-TR Release 5
  • Loading branch information
joaomachiana authored Oct 29, 2019
2 parents 2b5a7b8 + b3331f7 commit 5236d2a
Show file tree
Hide file tree
Showing 64 changed files with 1,648 additions and 238 deletions.
4 changes: 4 additions & 0 deletions ui/app/clinical/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ angular.module('consultation')
'print-prescription': {
templateUrl: 'dashboard/views/printPrescriptionReport.html',
controller: 'PrintPrescriptionReportController'
},
'print-transferOut': {
templateUrl: 'dashboard/views/PrintTransferOut.html',
controller: 'TransferController'
}
}
})
Expand Down
4 changes: 2 additions & 2 deletions ui/app/clinical/common/views/visitHeader.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@

</button>
<span class="grouped-buttons" ng-if="visitHistory.activeVisit || retrospectiveEntry">
<a class=" btn--left btn--success " ng-click="openConsultation()" ng-bind-html="'CONSULTATION_TAB_KEY' | translate"></a>
<a class="btn--right btn--success " title="{{'OPEN_IN_NEW_WINDOW'|translate}}" ng-click="collapseControlPanel()" ui-sref="patient.dashboard.show.observations({patientUuid: patient.uuid,programUuid: programUuid,conceptSetGroupName: 'observations'})" target="_blank"><i class="fa fa-external-link"></i></a>
<a class=" btn--left btn--success " ng-hide="patient.isReadOnly" ng-click="openConsultation()" ng-bind-html="'CONSULTATION_TAB_KEY' | translate"></a>
<a class="btn--right btn--success " title="{{'OPEN_IN_NEW_WINDOW'|translate}}" ng-hide="patient.isReadOnly" ng-click="collapseControlPanel()" ui-sref="patient.dashboard.show.observations({patientUuid: patient.uuid,programUuid: programUuid,conceptSetGroupName: 'observations'})" target="_blank"><i class="fa fa-external-link"></i></a>
</span>
<button class="toggle-patient" ng-click="toggleControlPanel()" ng-class="{'shift': showControlPanel}">
<i class="fa fa-bars fa-white fa-large"></i>
Expand Down
6 changes: 6 additions & 0 deletions ui/app/clinical/common/views/visitSummary.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@
visit-summary="visitSummary"></treatment-data>
</div>
</div>
<div data-ng-switch-when="appointment">
<section class="block observation section-grid">
<appointment-resume></appointment-resume>
</section>
</div>

<div data-ng-switch-when="disposition">
<div ng-if="::section.config">
<disposition id="disposition" params="::section.config"
Expand Down
32 changes: 4 additions & 28 deletions ui/app/clinical/config/visitMandatoryTab.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,6 @@
"showDetailsButton": true
}
},
"Disposition": {
"type": "disposition",
"translationKey": "VISIT_TITLE_DISPOSITIONS_KEY",
"displayOrder": 3,
"config": {
"translationKey":"VISIT_TITLE_DISPOSITION_KEY",
"numberOfVisits": 1,
"showDetailsButton": true
}
},
"Admission Details": {
"type": "admissionDetails",
"displayOrder": 4,
"config": {
"translationKey": "VISIT_TITLE_ADMISSION_DETAILS_KEY",
"showDetailsButton": true
}
},
"Investigation Result": {
"type": "investigationResult",
"title": "Investigation Result",
Expand Down Expand Up @@ -89,18 +71,12 @@
"showProvider" : true
}
},
"Radiology": {
"type": "radiology",
"Appointments": {
"type": "appointment",
"title": "Appointments",
"displayOrder": 7,
"config": {
"translationKey": "VISIT_TITLE_RADIOLOGY_KEY"
}
},
"Patient Files": {
"type": "patientFiles",
"displayOrder": 8,
"config": {
"translationKey": "VISIT_TITLE_PATIENT_FILES_KEY"
"translationKey": "CONSULTATION_TAB_APPOINTMENT_HEADER_LABEL"
}
}
}
Expand Down
37 changes: 34 additions & 3 deletions ui/app/clinical/consultation/consultationInitialization.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,48 @@ angular.module('bahmni.clinical').factory('consultationInitialization',

return getEncounter().then(function (consultation) {
return diagnosisService.populateDiagnosisInformation(patientUuid, consultation).then(function (diagnosisConsultation) {
diagnosisConsultation.preSaveHandler = new Bahmni.Clinical.Notifier();
var arrCurrent = [];
var arrPast = [];
if ((diagnosisConsultation.savedDiagnosesFromCurrentEncounter.length === 0) && (diagnosisConsultation.pastDiagnoses.length === 0))
{
$rootScope.diagName = null;
}

else if (diagnosisConsultation.savedDiagnosesFromCurrentEncounter.length > 0)
{
for (var i = 0; i < diagnosisConsultation.savedDiagnosesFromCurrentEncounter.length; i++)
{
arrCurrent.push(diagnosisConsultation.savedDiagnosesFromCurrentEncounter[i].codedAnswer.shortName);
}
$rootScope.diagName = arrCurrent;
}

else if (diagnosisConsultation.pastDiagnoses.length > 0)
{
var a = diagnosisConsultation.pastDiagnoses[0].codedAnswer.name;
$rootScope.diagPastName = a;
arrPast.push($rootScope.diagPastName);
}

diagnosisConsultation.preSaveHandler = new Bahmni.Clinical.Notifier();
diagnosisConsultation.postSaveHandler = new Bahmni.Clinical.Notifier();
return diagnosisConsultation;
});
}).then(function (consultation) {
}).then(function (consultation)
{
return conditionsService.getConditions(patientUuid).then(function (conditions) {
consultation.conditions = conditions;
if (consultation.conditions.length > 0)
{
$rootScope.conditionName = consultation.conditions[0].concept.name;
}
return consultation;
});
}).then(function (consultation) {
return allergiesService.getAllergies(patientUuid).then(function (allergies) {
}).then(function (consultation)
{
return allergiesService.getAllergies(patientUuid).then(function (allergies)
{
consultation.allergies = allergies;
return consultation;
});
Expand Down
Loading

0 comments on commit 5236d2a

Please sign in to comment.