I am developing a custom openmrs module [Reference App]. Within the module, I created new encounter types using the encounter service class. I added these new encounter to the patient visit actions.
For the form, i did not use the htmlform entry - this was because of my custom requirement. Certain details for the forms (some of which were autocomplete) were not implemented as concepts, instead, they were gotten from a custom database. With what I have when i save, needed details show up in observation, and when I check visit history, I can see them as part of past observation.
But with these came two issues:
Edit - unlike the default encounter types (like Visit Note), the edit icon does not show up when checking the encounter types (past visit history).
So, after doing a little research i discovered that in the reference app module,in the encounterDisplay_extension.json file, there’are default supported encounter types, which the editable properties are set to true. But since my encounter types are created dynamically, i may not be able to know their uuid (since i may install the module in more than one openmrs installation).
My encounters still show as part of action for past visit, even when the record is already there.
Any suggestions on resolving the above issue would be appreciated. @darius, @dkayiwa, @wyclif … Thanks.
In my module activator I do the following in the started Method:
MetadataDeployService deployService = Context.getService(MetadataDeployService.class); deployService.installBundle(Context.getRegisteredComponents(EncounterTypeMetadataBundle.class).get(0));
Since the UUIDs are available then you can extend them in a way similar the EncounterDisplay_extension.json file
Thanks. I got it working. But when you click on the edit icon in the past vist, it takes you to a url like this: htmlformentryui/htmlform/editHtmlFormWithStandardUi.page?patientId=107&encounterId=1252.
Is there a way I can change this default behaviour? Maybe in some configuration?
Hello All, I am developing a drug order module where I have a form in a fragment displaying when the user clicks on a link/button named “Add”; In other words, when the user clicks on the “Add” link on the dashboard, a drug order (prescription) form appears on the side with fields to enter the drug composition details.
When I am looking for is something similar to Visits page (snapshots posted above)
When we click on the “show details” link, a fragment appears beneath the box…
Could anyone please give me the link to this code. I have spent quite sometime trying to figure this out…