Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BS-91 | Merging SNOMED master to Bahmni master #582

Merged
merged 40 commits into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
704e82f
BS-39 | Siva,Vijay | Publish openmrs-module-bahmniapps with SNOMED im…
vijayanandtwks Dec 26, 2022
825c6d8
BS-48 | Patrick | display a toast message if terminology server is un…
nyatindopatrick Feb 1, 2023
31826e5
BS-75 | Patrick | Prefix diagnosis Coded Answer UUID with conceptSyst…
nyatindopatrick Feb 2, 2023
b0cedd6
BS-75 | Patrick | Update diagnosis Coded Answer UUID delimiter
nyatindopatrick Feb 2, 2023
b6656c9
Siva Reddy | BS-42 | Auto deployment to SNOMED Dev Environment (#534)
sivareddyp Feb 20, 2023
a7e40e7
BS-48 | Patrick | Fix error message poput timeout
nyatindopatrick Feb 16, 2023
54162f5
BS-48 | Patrick | Update condition to use shorthand syntax
nyatindopatrick Feb 16, 2023
646f8e7
BS-48 | Patrick | Display generic diagnosis TS error message
nyatindopatrick Feb 24, 2023
9222d44
BS-48 | Patrick | Remove null error messages
nyatindopatrick Feb 27, 2023
b83895b
BS-48 | Patrick | add error handler for diagnosis search
nyatindopatrick Feb 28, 2023
04c6836
BS-48 | Patrick | update messaging key on diagnosis controller
nyatindopatrick Feb 28, 2023
790b91c
BS-103 | Patrick | Create FHIR Bundle resource when drug name is sele…
nyatindopatrick Mar 17, 2023
f214929
BS-102 | made changes to send only draft conditiion/diagnosis/medicat…
manimaarans Mar 27, 2023
fefb74e
BS-103 | Patrick | display CDSS alert for drug interactions when drug…
nyatindopatrick Mar 27, 2023
6ed8ff7
BS-103 | replaced arrow function with normal function
manimaarans Mar 28, 2023
e9e8515
BS-103 | Patrick | Modify test cases for drug selection
nyatindopatrick Mar 28, 2023
2acb5fc
BS-103 | removed patient resources from fhir bundle
manimaarans Mar 28, 2023
046be20
BS-103 | updated the interaction type
manimaarans Mar 28, 2023
43b164c
BS-103 | make cdss call only when cdss enabled is true
manimaarans Mar 28, 2023
ca3dca3
BS-103 | fixed eslint issues
manimaarans Mar 28, 2023
ec33572
BS-103 | updated test file with mock to fix the build issue
manimaarans Mar 29, 2023
f8552fd
BS-103 | resolve the concept source using drug id and storing it in l…
manimaarans Mar 31, 2023
008018f
BS-103 | Patrick | add cdss alerts for drug-diagnosis
nyatindopatrick Apr 12, 2023
2272067
BS-103 | Patrick | Limit audit eventType length
nyatindopatrick Apr 12, 2023
2db981c
BS-103 | Patrick | Add label do CDSS critical dismissal options
nyatindopatrick Apr 12, 2023
84b3969
BS-103 | Patrick | Remove extra div from alert
nyatindopatrick Apr 12, 2023
72d123c
BS-103 | Patrick | Update audit order and dismissal label
nyatindopatrick Apr 14, 2023
46977fe
BS-103 | Patrick | Update unit tests
nyatindopatrick Apr 17, 2023
041bcb2
BS-103 | Patrick | Add cdss alert source
nyatindopatrick Apr 20, 2023
95cfa26
BS-103 | Patrick | Refactor: rename variables and classes for clarity
nyatindopatrick Apr 25, 2023
44698ff
BS-103 | Patrick | Added dynamic update of conditions
nyatindopatrick Apr 25, 2023
af3be20
BS-103 | Patrick | Clear CDSS alerts when drugs form is cleared
nyatindopatrick May 3, 2023
2735847
Siva Reddy | Triggering Deployment in new repo for SNOMED
sivareddyp May 11, 2023
273a2c8
BS-103 | added condition concept system resolve logic and correspondi…
manimaarans May 18, 2023
756c7ea
BS-translations-fix | Patrick | Remove added translations to other la…
nyatindopatrick May 23, 2023
8ed1daa
Reverting SNOMED Specific Changes
sivareddyp May 29, 2023
8a8401d
Add wiki link in readme (#581)
nyatindopatrick May 31, 2023
35fcf80
BS-48-fix | Patrick | Remove custom TS server error message (#583)
nyatindopatrick May 31, 2023
82eaf69
BS-148 | Adding support for multiple prefix search in drug order (#598)
sivareddyp Jun 9, 2023
811ae8f
Merge branch 'master' into snomed-to-master
sivareddyp Jul 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,28 +65,42 @@ Resources to build the following docker images can be found in the [package](/pa

## Prevent Search Engines from Indexing the homepage


>⚠️ : Search Engines are able to index the Bahmni App homepage.

This behaviour can be prevented by:

1. **Adding a “noindex” metatag:**
1. **Adding a “noindex” metatag:**

The following tag should be inserted in the `<head>` section of the homepage's HTML markup:

```
<meta name=”robots” content=”noindex”>
```

Additionally, in order to both _de-index_ the homepage and not follow the links, use the `noindex` with the `nofollow` metatag:

```
<meta name=”robots” content=”noindex,nofollow”>
```
> The same is already done [here](https://github.com/Bahmni/openmrs-module-bahmniapps/blob/master/package/docker/index.html#L5)

> The same is already done [here](https://github.com/Bahmni/openmrs-module-bahmniapps/blob/master/package/docker/index.html#L5)
>
2. **Using an X-ROBOTS-TAG HTTP HEADER:**

An `X-Robots-Tag` can be added to the HTTP response header. It has basically the same effect as a `noindex` tag, but with the additional options to specify conditions for different search engines. For more information, please see Google’s guide [here](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag). Here are examples of X-Robots-Tag for specific functions:

- To de-index a web page:

```
Header set X-Robots-Tag "noindex, nofollow"
```

> The same is already done [here](https://github.com/Bahmni/openmrs-module-bahmniapps/blob/master/package/docker/httpd.conf#L32)
>

### SNOMED Integration Support

openmrs-module-bahmniapps also integrates with SNOMED for terminology lookup and CDSS. More details can be found in [this](https://bahmni.atlassian.net/wiki/spaces/BAH/pages/3132686337/SNOMED+FHIR+Terminology+Server+Integration+with+Bahmni) Wiki link
=======
> The same is already done [here](https://github.com/Bahmni/openmrs-module-bahmniapps/blob/master/package/docker/httpd.conf#L32)
1 change: 1 addition & 0 deletions ui/app/clinical/common/models/drugOrderViewModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,7 @@ Bahmni.Clinical.DrugOrderViewModel.createFromContract = function (drugOrderRespo
};
}
viewModel.instructions = administrationInstructions.instructions;
viewModel.audit = drugOrderResponse.audit;
viewModel.additionalInstructions = administrationInstructions.additionalInstructions;
viewModel.quantity = drugOrderResponse.dosingInstructions.quantity;
viewModel.quantityUnit = drugOrderResponse.dosingInstructions.quantityUnits;
Expand Down
236 changes: 224 additions & 12 deletions ui/app/clinical/consultation/controllers/addTreatmentController.js

Large diffs are not rendered by default.

12 changes: 8 additions & 4 deletions ui/app/clinical/consultation/controllers/diagnosisController.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,13 @@ angular.module('bahmni.clinical')
value: concept.matchedName || concept.conceptName,
concept: {
name: concept.conceptName,
uuid: concept.conceptUuid
uuid: concept.conceptUuid,
conceptSystem: concept.conceptSystem
},
lookup: {
name: concept.matchedName || concept.conceptName,
uuid: concept.conceptUuid
uuid: concept.conceptUuid,
conceptSystem: concept.conceptSystem
}
};

Expand All @@ -163,6 +165,8 @@ angular.module('bahmni.clinical')

$scope.getAddConditionMethod = function () {
return function (item) {
var conceptSystem = item.lookup.conceptSystem ? item.lookup.conceptSystem + "/" : "";
item.lookup.uuid = conceptSystem + item.lookup.uuid;
$scope.consultation.condition.concept.uuid = item.lookup.uuid;
item.value = $scope.consultation.condition.concept.name = item.lookup.name;
};
Expand Down Expand Up @@ -270,9 +274,9 @@ angular.module('bahmni.clinical')
};

$scope.cleanOutDiagnosisList = function (allDiagnoses) {
return allDiagnoses.filter(function (diagnosis) {
return allDiagnoses ? allDiagnoses.filter(function (diagnosis) {
return !alreadyAddedToDiagnosis(diagnosis);
});
}) : [];
};

var alreadyAddedToDiagnosis = function (diagnosis) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ Bahmni.Clinical.EncounterTransactionMapper = function () {

if (consultation.newlyAddedDiagnoses && consultation.newlyAddedDiagnoses.length > 0) {
encounterData.bahmniDiagnoses = consultation.newlyAddedDiagnoses.map(function (diagnosis) {
var conceptSystem = diagnosis.codedAnswer.conceptSystem ? diagnosis.codedAnswer.conceptSystem + "/" : "";
return {
codedAnswer: { uuid: !diagnosis.isNonCodedAnswer ? diagnosis.codedAnswer.uuid : undefined},
codedAnswer: { uuid: !diagnosis.isNonCodedAnswer ? conceptSystem + diagnosis.codedAnswer.uuid : undefined},
freeTextAnswer: diagnosis.isNonCodedAnswer ? diagnosis.codedAnswer.name : undefined,
order: diagnosis.order,
certainty: diagnosis.certainty,
Expand Down
4 changes: 3 additions & 1 deletion ui/app/clinical/consultation/models/drugSearchResult.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ Bahmni.Clinical.DrugSearchResult = (function () {
var getMatcher = function (searchString) {
return function (value) {
// return value.search(new RegExp(searchString, "i")) !== -1
return _.includes(value.toLowerCase(), searchString.toLowerCase());
return _.every(searchString.split(" "), function (word) {
return _.includes(value.toLowerCase(), word.toLowerCase());
});
};
};
var getSynonymCreator = function (drug) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,54 @@ <h3 class="orderSet-additional-info" ng-show="treatmentConfig.showAdditionalInfo
</div>
</article>

<h3 ng-show="cdssaAlerts && cdssaAlerts.length > 0" class="cdss-alerts">
{{"CDSS_" + cdssaAlerts[0].indicator.toUpperCase() | translate}}
</h3>

<div ng-repeat="cdssAlert in cdssaAlerts" class="cdss-alert" ng-class="{'alert-danger': cdssAlert.indicator == 'critical', 'alert-warning': cdssAlert.indicator == 'warning', 'alert-info': cdssAlert.indicator == 'info'}" ng-show="cdssAlert">
<button ng-disabled="cdssAlert.indicator == 'critical'" type="button" class="cdss-alert-close" ng-click="closeAlert($index)">&times;</button>
<i class="fa" aria-hidden="true"
ng-class="{'fa-exclamation-triangle': cdssAlert.indicator == 'critical' || cdssAlert.indicator == 'warning', 'fa-info-circle': cdssAlert.indicator == 'info'}"
></i>
<div>
<div ng-click="toggleAlertDetails($index)" class="cdss-alert-summary">
<span>{{cdssAlert.summary}}</span>
<i class="fa" ng-class="{'fa-angle-up': cdssAlert.showDetails, 'fa-angle-down': !cdssAlert.showDetails}"></i>
</div>
<div class="cdss-alert-details" ng-show="cdssAlert.showDetails">
<span>{{cdssAlert.detail}}</span>
<a href="{{cdssAlert.source.url}}" target="_blank" ng-show="cdssAlert.source.url">
<i class="fa fa-question-circle"></i>
</a>
<div ng-show="cdssAlert.indicator == 'critical'">
<div class="field-value">
<select id="cdss-audit" class="form-field cdss-alert-close-reason"
ng-options="item as (item | translate) for item in auditOptions()"
ng-model="treatment.audit"
>
<option disabled value="">{{"CDSS_ALERT_DISMISSAL_REASON" | translate}}</option>
</select>
</div>

<div class="operations fr clearfix" ng-show="cdssAlert.indicator == 'critical'">
<button
ng-click="submitAudit($index)"
ng-disabled="!treatment.audit"
type="button" class="icon-button secondary-button" tabindex="1" title="Dismiss">
{{'CDSS_ALERT_DISMISS' | translate}}
</button>
</div>
</div>

</div>

</div>
</div>


<div class="operations fr clearfix">
<button class="add-drug-btn secondary-button fl" type="submit" accesskey="{{ ::treatmentConfig.translate('addAccessKey', 'MEDICATION_ADD_ACCESS_KEY') }}"
ng-disabled="!treatment.drug.uuid && !treatment.concept.uuid && treatment.drugNameDisplay && !treatment.isNonCodedDrug">
ng-disabled="!treatment.drug.uuid && !treatment.concept.uuid && treatment.drugNameDisplay && !treatment.isNonCodedDrug || (cdssaAlerts && cdssaAlerts[0].indicator == 'critical')">
<span ng-bind-html="::treatmentConfig.translate('add', 'MEDICATION_ADD_BUTTON_LABEL')">
</span>
</button>
Expand Down
4 changes: 4 additions & 0 deletions ui/app/common/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Bahmni.Common = Bahmni.Common || {};
var BASE_URL = hostUrl + "/bahmni_config/openmrs/apps/";
var CUSTOM_URL = hostUrl + "/implementation_config/openmrs/apps/";
var IE_APPS_API = RESTWS_V1 + "/bahmniie";
var FHIR_BASE_URL = hostUrl + "/openmrs/ws/fhir2/R4";

var serverErrorMessages = [
{
Expand Down Expand Up @@ -75,11 +76,14 @@ Bahmni.Common = Bahmni.Common || {};
diseaseTemplateUrl: BAHMNI_CORE + "/diseaseTemplates",
AllDiseaseTemplateUrl: BAHMNI_CORE + "/diseaseTemplate",
emrapiConceptUrl: EMRAPI + "/concept",
bahmniapiConceptUrl: BAHMNI_COMMONS + "/terminologies/concepts",
encounterConfigurationUrl: BAHMNI_CORE + "/config/bahmniencounter",
patientConfigurationUrl: BAHMNI_CORE + "/config/patient",
drugOrderConfigurationUrl: BAHMNI_CORE + "/config/drugOrders",
emrEncounterUrl: EMRAPI + "/encounter",
encounterUrl: RESTWS_V1 + "/encounter",
cdssUrl: RESTWS_V1 + "/cdss",
fhirMedicationsUrl: FHIR_BASE_URL + "/Medication",
locationUrl: RESTWS_V1 + "/location",
bahmniVisitLocationUrl: BAHMNI_CORE + "/visitLocation",
bahmniFacilityLocationUrl: BAHMNI_CORE + "/facilityLocation",
Expand Down
6 changes: 5 additions & 1 deletion ui/app/common/domain/services/diagnosisService.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ angular.module('bahmni.common.domain')
.service('diagnosisService', ['$http', '$rootScope', function ($http, $rootScope) {
var self = this;
this.getAllFor = function (searchTerm, locale) {
var url = Bahmni.Common.Constants.emrapiConceptUrl;
var url = Bahmni.Common.Constants.bahmniapiConceptUrl;
var parameters = {term: searchTerm, limit: Bahmni.Common.Constants.emrapiDiagnosisLimit};
if (locale) {
parameters.locale = locale;
Expand All @@ -25,6 +25,10 @@ angular.module('bahmni.common.domain')
var url = Bahmni.Common.Constants.bahmniDeleteDiagnosisUrl;
return $http.get(url, {
params: {obsUuid: obsUuid}
}, function (response) {
return response;
}, function (error) {
return error;
});
};

Expand Down
47 changes: 45 additions & 2 deletions ui/app/common/services/drugService.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
angular.module('bahmni.common.services')
.factory('drugService', ['$http', function ($http) {
var v = 'custom:(uuid,strength,name,dosageForm,concept:(uuid,name,names:(name)))';
var v = 'custom:(uuid,strength,drugReferenceMaps,name,dosageForm,concept:(uuid,name,names:(name)))';
var search = function (drugName, conceptUuid) {
var params = {
v: v,
Expand Down Expand Up @@ -46,9 +46,52 @@ angular.module('bahmni.common.services')
});
};

var sendDiagnosisDrugBundle = function (bundle) {
return $http.post(Bahmni.Common.Constants.cdssUrl, bundle, {
withCredentials: true,
params: { service: 'medication-order-select' }
});
};

var cdssAudit = function (patientUuid, eventType, message, module) {
var alertData = {
patientUuid: patientUuid,
eventType: eventType,
message: message,
module: module
};
return $http.post(Bahmni.Common.Constants.auditLogUrl, alertData, {
withCredentials: true
});
};

var getDrugConceptSourceMapping = function (drugUuid) {
var params = {
_id: drugUuid
};

return $http.get(Bahmni.Common.Constants.fhirMedicationsUrl, {
params: params,
withCredentials: true
});
};
var getCdssEnabled = function () {
return $http.get(Bahmni.Common.Constants.globalPropertyUrl, {
method: "GET",
params: {
property: 'cdss.enable'
},
withCredentials: true
});
};

return {
search: search,
getRegimen: getRegimen,
getSetMembersOfConcept: getSetMembersOfConcept
getSetMembersOfConcept: getSetMembersOfConcept,
sendDiagnosisDrugBundle: sendDiagnosisDrugBundle,
getDrugConceptSourceMapping: getDrugConceptSourceMapping,
getCdssEnabled: getCdssEnabled,
cdssAudit: cdssAudit
};
}]);
9 changes: 7 additions & 2 deletions ui/app/common/ui-helper/services/messagingService.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ angular.module('bahmni.common.uiHelper')

this.showMessage = function (level, message, errorEvent) {
var messageObject = {'value': '', 'isServerError': false};
messageObject.value = message;
messageObject.value = message.replace(/\[|\]|null/g, '');
if (errorEvent) {
messageObject.isServerError = true;
if (!self.messages[level].length) {
this.createTimeout('error', 6000);
}
} else if (level == 'info') {
this.createTimeout('info', 4000);
}
Expand All @@ -25,7 +28,9 @@ angular.module('bahmni.common.uiHelper')
if (index >= 0) {
this.messages[level].splice(index, 1);
}
this.messages[level].push(messageObject);
if (messageObject.value) {
this.messages[level].push(messageObject);
}
};

this.createTimeout = function (level, time) {
Expand Down
15 changes: 14 additions & 1 deletion ui/app/i18n/clinical/locale_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -371,5 +371,18 @@
"SHARE_PRESCRIPTION_MAIL_CONTENT": "Hi #recipientName,\nThanks for visiting #locationName on #visitDate. Your prescription is attached with this email. Wish you a speedy recovery.\nThanks.\n#locationName\n#locationAddress",
"CHIEF_COMPLAINT_CODED_KEY": "Chief Complaint Coded",
"SIGN_SYMPTOM_DURATION_KEY": "Sign/symptom duration",
"CHIEF_COMPLAINT_DURATION_UNIT_KEY": "Chief Complaint Duration"
"CHIEF_COMPLAINT_DURATION_UNIT_KEY": "Chief Complaint Duration",
"FALSE_POSITIVE_ALERT": "The alert triggered, but it was a false positive and no action is needed.",
"NOT_APPLICABLE_TO_THE_PATIENT": "The alert does not apply to the patient in question.",
"ALREADY_RESOLVED_BY_MEDICATION_ADJUSTMENT": "The alert was previously resolved by adjusting the patient's medication.",
"ALREADY_MANAGED_BY_OTHER_MEANS": "The alert was previously managed by other means, and no further action is needed.",
"PATIENT_DECLINED_RECOMMENDED_ACTION": "The patient declined the recommended action despite the alert.",
"CLINICIAN_JUDGMENT_OVERRODE_RECOMMENDATION": "The clinician used their judgment to override the recommendation generated by the alert.",
"ALERT_TRIGGERED_IN_ERROR": "The alert triggered in error, and no action is needed.",
"INSUFFICIENT_INFORMATION_TO_ACT_ON_ALERT": "There is not enough information available to act on the alert.",
"CDSS_WARNING" :"Warning",
"CDSS_CRITICAL" :"Critical",
"CDSS_ALERT_DISMISSAL_REASON" :"Select reason for dismissal",
"CDSS_INFO" :"Info",
"CDSS_ALERT_DISMISS": "Dismiss"
}
Loading