/
Birth Certificate
Birth Certificate
- Sravanthi N. S. CH.
- Himabindu Akkinepalli
- teresa gracias
Owned by Sravanthi N. S. CH.
Purpose
It can be used to create a control to add a Birth Certificate
Configuration
Add a birthCertificate directive
Consider the following example to add a birthCertificate as a new directive:
'use strict'; angular.module('bahmni.common.displaycontrol.custom') .directive('birthCertificate', ['observationsService', 'appService', 'spinner', function (observationsService, appService, spinner) { var link = function ($scope,element) { var conceptNames = ["HEIGHT"]; $scope.contentUrl = appService.configBaseUrl() + "/customDisplayControl/views/birthCertificate.html"; spinner.forPromise(observationsService.fetch($scope.patient.uuid, conceptNames, "latest", undefined, $scope.visitUuid, undefined).then(function (response) { $scope.observations = response.data; }), element); }; return { restrict: 'E', template: '<ng-include src="contentUrl"/>', link: link } }])
- In the above example, the concept names we want to fetch is configured in the variable conceptNames.
- To display the spinner for each display control while loading, element should be passed in spinner.forPromise() as shown in the above example.
- You can create your own template in the directive "openmrs/apps/customDisplayControl/views/"
Create a birthCertificate Display page
Consider the following example to create a birthCertificate.html:
<div> {{config.title}} <section class="dashboard-section"> <ul class="form-field"> <li ng-repeat="obsGroup in observations"> <span class="obs-date"> {{obsGroup.conceptNameToDisplay }} </span> <span class="obs-date"> {{obsGroup.value}} </span> </li> </ul> </section> </div>
Related pages
Patient Monitoring Tool
Patient Monitoring Tool
Read with this
dashboard.json
dashboard.json
Read with this
Clinical Observation Controls
Clinical Observation Controls
Read with this
Flowsheet Control
Flowsheet Control
Read with this
Bacteriology Results Control
Bacteriology Results Control
Read with this
Obs To Obs FlowSheet
Obs To Obs FlowSheet
Read with this
The Bahmni documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)