Print Medications

Purpose and Benefits

The "print medications" feature allows users to generate a physical copy of their medication list, which includes details such as the names of the medications, dosages, and schedules. This is particularly useful for doctor appointments, hospital visits, or for keeping an accessible record at home. By having a printed list, patients can ensure accurate communication with healthcare providers and manage their medication regimen more effectively.

The prescription can be printed for OPD patient in the cases like :

  1. When the drugs are dispensed, the print out of the prescription needs to be taken and stored in the patient file for 2 years to comply with govt regulations

  2. When OPD drugs could not be dispensed, the print out has to be handed over to the patient so that they can procure them from a different pharmacy.

In case of IPD patients, the drugs are procured from the "mini stores" inside the hospital and does not need to be printed.

To print medications, select the checkboxes corresponding to the medications you want to print. The print button will only be enabled if at least one medication is selected. By default, all medications will be selected. If you don’t want all medications to be selected, you need to configure it accordingly (see the config section for details).

image-20240529-000058.png

Sample PDF file generated from the medication page with the list of selected medications,

image-20240529-002033.png

Configure Medication Print Feature:

Below configuration required to be added to clinical/app.json in the config section to enable print medication functionality.

"printPrescriptionFeature": { "printDiagnosis":{ "order": "PRIMARY", "certainity": "CONFIRMED" }, "observationsConcepts": ["WEIGHT"], "providerAttributesForPrint": ["Provider Full Name","Provider Title","Medical Licence Number"], "templateUrl": "/bahmni_config/openmrs/apps/clinical/clinicalPrints/medicationPrint.html", "title": "Childern's Hospital of Ethiopia", "header": "PRESCRIPTION", "logo": "/bahmni_config/openmrs/apps/clinical/clinicalPrints/images/Bahmni_logo_primary.png", "autoSelectNotAllowed": false }

Config Descriptions:

Field Name

Description

Optional

Field Name

Description

Optional

printDiagnosis

This is type of diagnosis we want to print in the prescription.

For eg: if we want to show the diagnosis which are primary and confirmed, we need to give the order as PRIMARY and certainity as CONFIRMED

Yes

observationsConcepts

This is a list of concepts. This is to fetch the latest observation captured for the patients for the given concepts which can then be consumed in the custom template to show values like patient's height, weight, etc..

Yes

templateUrl

This field is required for the custom template to be used for printing the prescriptions. If we want a default Bahmni's template and not the custom one, we need to remove this config

Yes

autoSelectNotAllowed

This is a boolean value and can be used to auto select all the prescriptions by default on the load of the page and vice versa before printing.

If we set it as true , then we need to select the check boxes manually.

If we set it as false or omit this config, then all the checkboxes of the medications are selected by default.

Yes

Note: If we want to show these custom options like diagnosis, observations, etc. in the pdf, then we need to give a custom template that’ll include html elements with appropriate css to show these data. One can refer this sample html (medicationPrint.html) below

Sample medicationPrint.html :

<link rel="stylesheet" href="/bahmni_config/openmrs/apps/clinical/clinicalPrints/css/print.css"/> <style> @media print { /* Hide the header */ @page { margin-top: 20px; } header, .header { display: none !important; } /* Hide the footer */ @page { margin-bottom: 20px; } footer, .footer { display: none !important; } } </style> <div class="print-wrapper custom-print-style" ng-switch="encounterDrugOrderMap!=null"> <div class="print-header" ng-if="printParams"> <div class="print-logo-plus-text"> <img class="print-logo" width="125px" ng-if="printParams.logo" ng-src="{{printParams.logo}}" alt="logo"/> <h1 class="print-logo-text">{{printParams.title}}</h1> <div class="print-right"></div> </div> <div class="clinic-info"> <span> {{printParams.header}}</span> </div> <div style="float: left;text-align: left;font-size: 10pt;font-weight: bold;margin-bottom: 10px;margin-top: 10px;" ng-bind-html="additionalInfo.facilityLocation.address5"></div> </div> <!-- Patient Info --> <div class="patient-info"> <table ng-switch="encounterDrugOrderMap!=null"> <tr> <td colspan="2" style="font-size: 12pt;">Name of the Patient: <span class="value">{{patient.name}} ({{patient.identifier}})</span></td> <td>Date : <span class="value">{{additionalInfo.currentDate | bahmniDate}}</span></td> </tr> <tr> <td>Age: <span class="value"> {{patient.birthdate | dateToAge:visit.dateStarted}} </span></td> <td>Sex: <span class="value">{{patient.genderText.substring(6, patient.genderText.length - 7)}}</span></td> <td>Weight: <span class="value">{{observationsEntries[0].value}} {{observationsEntries[0].concept.units}}</span></td> </tr> <tr> <td>Address: <span class="value">{{patient.address.address5}}</span></td> <td>Kebele: <span class="value">{{patient.address.address4}}</span></td> <td>Woreda: <span class="value">{{patient.address.address3}}</span></td> </tr> <tr> <td>Zone: <span class="value">{{patient.address.address2}}</span></td> <td>Region: <span class="value">{{patient.address.address1}}</span></td> <td>Country: <span class="value">{{patient.address.country}}</span></td> </tr> <tr> <td>Tel no: <span class="value">{{patient.mobilePhone.value}}</span></td> <td colspan="2">Visit Type: <span class="value"> {{additionalInfo.visitType}} </span></td> </tr> <tr> <td>Diagnosis (ICD-10 code): <span class="value">{{ diagnosesCodes }}</span></td> <td colspan="2">Allergies: <span class="value"> {{ allergies.length > 0 ? allergies : "No allergies recorded for this patient"}} </span></td> </tr> <tr> </tr> </table> </div> <!-- Prescription Info --> <section ng-switch-when="true" bindonce="encounterDrugOrderMap"> <section class="block treatment-section" ng-show="encounterDrugOrderMap.length>0"> <h2 class="section-title">Treatment</h2> <div ng-repeat="(key, value) in encounterDrugOrderMap"> <table class="printPrescription"> <tr> <th style="width : 33%">{{'MEDICATION_DRUG_NAME_TITLE'|translate}}</th> <th style="width : 43%">{{'MEDICATION_DOSAGE_INFORMATION_LABEL'|translate}}</th> <th style="width : 10%">{{'MEDICATION_LABEL_START_DATE'|translate}}</th> <th style="width : 14%">{{'PRINT_MEDICATION_TOTAL_QUANTITY_TITLE'|translate}}</th> </tr> <tbody ng-repeat="drugOrder in value.drugOrders" ng-class="{'strike-through': drugOrder.isDiscontinuedOrStopped()}"> <tr> <td class="drug-name" bo-text="drugOrder.getDisplayName()" ng-class="{'strike-text':drugOrder.isDiscontinuedOrStopped()}"></td> <td class="dosage-form"> <span bo-show="drugOrder.getDescription()" bo-text="drugOrder.getDescription()" ng-class="{'strike-text':drugOrder.isDiscontinuedOrStopped()}"></span> <span bo-show="!drugOrder.getDescription()" bo-text="' - '"></span> <span ng-if="drugOrder.isDiscontinuedOrStopped()" class="fr">stopped {{::drugOrder.effectiveStopDate | bahmniDate}}</span> </td> <td bo-text="(drugOrder.effectiveStartDate | bahmniDate)"></td> <td class="drug-name"> <span bo-show="drugOrder.getQuantityWithUnit()" bo-text="drugOrder.getQuantityWithUnit()"></span> </td> </tr> <tr ng-if="::drugOrder.additionalInstructions"> <td></td> <td colspan="2" class="inline-notes notes" style="color: #787878;"> <p class="left"><strong style="padding-left: 0px;padding-bottom: 0px;">{{'TREATMENT_NOTES'|translate}}: </strong>{{drugOrder.additionalInstructions}}</p> </td> <td></td> </tr> </tbody> </table> <div> <span style="float: left; margin-top:15px; margin-bottom: 25px;"> <h2 class="encounter-info">Prescriber :</h2> <table> <tr> <td style="padding: 0px;">Full Name: {{value.drugOrders[0].provider.attributes[0].value}}</td> </tr> <tr> <td style="padding: 0px;">Title: {{value.drugOrders[0].provider.attributes[1].value}}</td> </tr> <tr> <td style="padding: 0px;">Medical Licence Number: {{value.drugOrders[0].provider.attributes[2].value}}</td> </tr> </table> </span> <span style="float: right; margin-top:15px; margin-bottom: 25px;"> <h2 class="encounter-info">Dispenser :</h2> <table> <tr> <td style="padding: 0px;">Full Name: {{dispenserInfo[0].value}}</td> </tr> <tr> <td style="padding: 0px;">Title: {{dispenserInfo[1].value}}</td> </tr> <tr> <td style="padding: 0px;">Medical Licence Number: {{dispenserInfo[2].value}}</td> </tr> </table> </span> </div> </div> </section> </section> </div>

 

The Bahmni documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)