Can someone give me more advice on displayTemplate

hello all,

I’m trying to create a DrugOrder Form that will allow me to enter the medication for a patient in visit for now I’m trying to use this :

but I don’t have the possibility to enter the dose strength and the units, is there another way to do that ?

thank you for your help

Hi @tiless12.

You can use a convenience set (ConvSet) concept and the tag.

<obsgroup> Used to create an obs group. This is used when you need to link multiple concepts together. You are required to specify a groupingConceptId, which is of type ConvSet. For example, IMMUNIZATION HISTORY (1421), which has set members IMMUNIZATION SEQUENCE NUMBER (1418), VACCINE LOT NUMBER (1420), VACCINATION DATE (1410), IMMUNIZATIONS (984) and VACCINE MANUFACTURER (1419) which store the details related to the immunization. Nested obs groups are now supported.

See complete documentation at…

As a starting point, see this dispensing form that PIH built. The UUIDs are against the PIH Mirebalais database, but you get the idea.

Thank you @arbaughj but about the displayTemplate ?

Thank you @darius it hepls me a lot but for this example are they using a custom dictionry with PIH concept ? for the dosage

@tiless12, you will need to do the general thing that @arbaughj is describing, and you can use the PIH-specific form as an example, but you’re going to have to set this up to work against your own concept dictionary.

As far as “displayTemplate” see the section of the HTML Form Entry HTML Reference wiki page about coded observations, and look at the last two examples that have answerDrugs="true".

I’m almost OK with the ObsGroup a little bit abstract but almost OK. My problem now is that I can’t render the dosage units from a drop-down list, I have the ConSet with CIEL:162384 but without a specific datatype the Java wont render the HTML Form

here is an example :

it gives me : Cannot handle datatype: N/A (for concept 162384)

@darius @arbaughj Hello,

While I’m still on the dark for using the ConvSet with an OBS :slight_smile: when there is no datatype what I’have did : is that I’have created a Concep “Dosage Unit” with datatype “CODED” and class CONVSET then use this as with an OBS Tag like this :

giving me this :

do you think it is a good practice ? or can you show me how ? cause the Mirebalais example is a little bit confuse with the PIH identification

As I used Javascript on the past to duplicate field of group of fields when I used to create Website , do you think I can still use this possibility With the HTML Form entry list in order to Duplicate a group of field whenever someone star filling a row (like on filling the Medication first row a javascript to append a second row of medication on the page )

many thanks

If you want to see the specific concepts that PIH uses, you might try loading this Metadata Sharing package into a test database:

bu what do you think of my implementations ?

Sorry, I don’t actually have time to look deeply now. I’m just trying to share examples I know of that have been done elsewhere.


I am also looking for better approach to design medication order form. I designed following form which has and obsgroup tags.

But the form is rendered very slow. It takes >2 mins to display the form. Could you please share your experince and sample form?