O3: New Initiative to Automate HFE --> O3 Forms

Even though there is basic support to have an HFE form useable in an O3 interface (opens the HFE form in a new tab), this was meant to be a temporary measure for orgs who want to start using O3 in production but don’t have time to change their 10’s or 100’s or 1000’s of HFE forms into O3 forms. But, at some point, this work is still needed - so we’ve been wanting to help automate this conversion where possible.

Kudos to @aojwang & @kmakombe at Palladium-Kenya, who as of this week have started planning the script to help convert HFE form schemas to O3 form schemas - at least to some degree. If we can automate even some percentage of the effort, this is still useful for implementers, and is something @eudson and the UCSF @OHRI team were already thinking about.

Let’s track this work here :slight_smile:

Thanks @grace for this post. We are currently using forms in KenyaEMR to help guide the process. This will limit us, at least in the beginning, to the html tags used in our forms. This can then be expanded to support the common tags supported by html form entry module.

The idea is to have a basic JSON schema for every HTLM form which can then undergo cleanup and proper validation checks.

1 Like

@aojwang we (@OHRI ) are happy to support you on this, we had an initial discussion internally and we can share our finds with you.

1 Like

EXCITING UPDATE! :tada:

Update from @aojwang’s work as of today:
The schema migration seems to work! He has done a small prototype for KenyaEMR HFE forms and below is a sample questions list for the form.

I am so excited because what we have already in this prototype relieves us from having to type so much for the question concepts and answers (for coded obs). We can render date, text, numeric, coded obs. Next I will handle obsGroup which I think is simple right now.

We’ll share more details next week!

Payload example below. Of course it still needs some work and they will continue to iterate.

CC & FYI: @eudson @mwaririm @icrc.psousa @mksrom @ddesimone @slubwama

3 Likes

@aojwang & @kmakombe This is great work. How do we access this? This could help cut our work by half.

1 Like

Sorry I haven’t updated our progress for a while now. We managed to move over 50 forms last week where the automated schema migration script/code played a key role. Although not perfect, it is able to provide for over 60% of what would have been done manually. The automation is currently able to do the following:

  1. Generate appropriate json for obs and obsgroup tags - coded, text(area), date, boolean, diagnosis
  2. Repeating groups
  3. Group coded obs (checkboxes) defined using same conceptId but different answer concept
  4. Extract question labels from inline obs labelText attribute, text before or after obs tag, or any preceding td if obs tag is within a td. This is common in our forms but can be expanded to handle any common practices
  5. Extract answer labels from obs answer label(s) or concept names if explicit label(s) are not provided
  6. Pick obs id as defined in the schema

We had to modify the html schema to guarantee a complete and well descriptive json schema for certain forms. This was important in cases where the conversion logic couldn’t find appropriate label for a group or obs hence requiring for a manual fix. For a quick turnaround time, we updated the script so that it is able to read html forms from a configurable directory outside of OpenMRS.

@slubwama I am happy to take you through what we have done so far. We can plan with next week if that’s OK with you.

Regards,

4 Likes

Wow this is awesome Antony!!

(FYI @mozzy @gcliff @mksrom @rubailly @bistenes @ddesimone

@aojwang / @slubwama can I humbly ask that when you walk through this together, could you use this zoom link, so that it automatically records for others to watch? (If that’s okay w/ you of course): Launch Meeting - Zoom

3 Likes

That’s in order, @grace

1 Like

@aojwang will join in too for this cc @mozzy

2 Likes

@aojwang thanks for the offer for a work through. @grace we could organise this a virtual event that may help all the current implementers who are using html form entry

2 Likes

I completely agree :smiley: Here are some times that would work on the OMRS Community Calendar. https://doodle.com/meeting/organize/id/dRgjQQYe

@aojwang @slubwama @mozzy @herbert24 just indicate which of these would work for you :slight_smile: (and of course others are welcome too)

5 Likes

Hey does Thursday June 30 at 3pm EAT work for you @aojwang & @slubwama? Seems like that’s the best time for folks interested in the coaching session too. (Per this https://doodle.com/meeting/organize/id/dRgjQQYe

@grace That will do. Let me inform my team to be ready

1 Like

That is OK with me.

1 Like

@grace when you send the invite please include @samuel34 and @amugume

1 Like

works well for me too cc @mozzy

1 Like

@slubwama kindly don’t forget to invite me please! I haven’t interacted with the forms and I believe this is a golden opportunity.

2 Likes