Created
June 25, 2021 12:33
-
-
Save angshu/f329077478b8239fc74640e0c9380f73 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Vitals_demo", | |
"id": 4, | |
"uuid": "23ad0e07-43d3-41af-bb5b-fe919fd18296", | |
"defaultLocale": "en", | |
"controls": [ | |
{ | |
"type": "obsControl", | |
"label": { | |
"translationKey": "HEIGHT_4", | |
"id": "4", | |
"units": "", | |
"type": "label", | |
"value": "HEIGHT" | |
}, | |
"properties": { | |
"mandatory": false, | |
"notes": false, | |
"addMore": false, | |
"hideLabel": false, | |
"controlEvent": true, | |
"location": { | |
"column": 0, | |
"row": 0 | |
}, | |
"abnormal": false | |
}, | |
"id": "4", | |
"concept": { | |
"name": "HEIGHT", | |
"uuid": "5090AAAAAAAAAAAAAAAAAAAAAAAAAAAA", | |
"datatype": "Numeric", | |
"conceptClass": "Misc", | |
"conceptHandler": null, | |
"answers": [ | |
], | |
"properties": { | |
"allowDecimal": false | |
} | |
}, | |
"units": null, | |
"hiNormal": null, | |
"lowNormal": null, | |
"hiAbsolute": null, | |
"lowAbsolute": null, | |
"events": { | |
"onValueChange": "function(form) {\\n var height = form.get('HEIGHT').getValue();\\n if (parseInt(height) > 15)\\n form.get('WEIGHT').setHidden(true);\\n else\\n form.get('WEIGHT').setHidden(false);\\n}" | |
} | |
}, | |
{ | |
"type": "obsControl", | |
"label": { | |
"translationKey": "WEIGHT_5", | |
"id": "5", | |
"units": "", | |
"type": "label", | |
"value": "WEIGHT" | |
}, | |
"properties": { | |
"mandatory": false, | |
"notes": false, | |
"addMore": false, | |
"hideLabel": false, | |
"controlEvent": false, | |
"location": { | |
"column": 0, | |
"row": 1 | |
} | |
}, | |
"id": "5", | |
"concept": { | |
"name": "WEIGHT", | |
"uuid": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAA", | |
"datatype": "Numeric", | |
"conceptClass": "Misc", | |
"conceptHandler": null, | |
"answers": [ | |
], | |
"properties": { | |
"allowDecimal": false | |
} | |
}, | |
"units": null, | |
"hiNormal": null, | |
"lowNormal": null, | |
"hiAbsolute": null, | |
"lowAbsolute": null | |
}, | |
{ | |
"type": "obsControl", | |
"label": { | |
"translationKey": "BMI_3", | |
"id": "3", | |
"units": "", | |
"type": "label", | |
"value": "BMI" | |
}, | |
"properties": { | |
"mandatory": false, | |
"notes": false, | |
"addMore": false, | |
"hideLabel": false, | |
"controlEvent": false, | |
"location": { | |
"column": 0, | |
"row": 2 | |
}, | |
"abnormal": false | |
}, | |
"id": "3", | |
"concept": { | |
"name": "BMI", | |
"uuid": "c367d9ee-3f10-11e4-adec-0800271c1b75", | |
"datatype": "Numeric", | |
"conceptClass": "Computed", | |
"conceptHandler": null, | |
"answers": [ | |
], | |
"properties": { | |
"allowDecimal": true | |
} | |
}, | |
"units": null, | |
"hiNormal": null, | |
"lowNormal": null, | |
"hiAbsolute": null, | |
"lowAbsolute": null | |
} | |
], | |
"events": { | |
"onFormSave": "function(form) {\\n var height = form.get('HEIGHT').getValue();\\n var weight = form.get('WEIGHT').getValue();\\n if (height && weight) {\\n form.get('BMI').setValue(parseInt(height) + parseInt(weight));\\n }\\n}", | |
"onFormInit": "" | |
}, | |
"translationsUrl": "/openmrs/ws/rest/v1/bahmniie/form/translations" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment