Findings: "Transform openEHR to FHIR Questionnaire"

Ah, now I understand. I think this would need to be the choice of the implementer, so a UI choice applied after the initial conversion in this case.

can also be a choice in the generation, however would be or all texts or all strings :sweat_smile:

1 Like

From this example I think it should be ok to put in the code the binding to the original openEHR object, such as

<code>
   <system value="openEHR-EHR-OBSERVATION.laboratory_test_result.v1"/>
   <code value="at0005"/>
   <display value="Test name"/>
</code>

Like this?

<item>
	<linkId value="openEHR-EHR-OBSERVATION.blood_pressure.v2:at0004" />
	<text value="Systolisk" />
	<type value="quantity" />
	<code>
		<system value="http://unitsofmeasure.org" />
		<code value="mm[Hg]" />
		<display value="mm[Hg]" />
	</code>
</item>

I mean, instead of the loinc bindings, treat the original openEHR object as what’s giving the meaning. The units part with answerOption I think it’s ok

Is there some common unique reference to the Code System other than openEHR-EHR-OBSERVATION.laboratory_test_result.v1?

http://hl7.org/fhir/datatypes-definitions.html#Coding.system

The URI may be an OID (urn:oid:…) or a UUID (urn:uuid:…). OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7’s list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously.

I’ve put that under an uri such as “http://openehr.org/openEHR-EHR-OBSERVATION.laboratory_test_result.v1” in the past. In fact, this openehr base uri is also configurable

This attribute was removed completely in today’s version BTW

1 Like

Noticed that a few of the ValueSet generated from this OPT: https://arketyper.no/ckm/templates/1078.60.876/opt is missing code values

I’ve added two examples generated from that OPT, one where the code values are included, and one where they are missing

Example of ValueSet missing code values:

<?xml version="1.0" encoding="UTF-8"?>
<ValueSet xmlns="http://hl7.org/fhir">
   <id value="ValueSet-report-v1-_testname_en_-R4"/>
   <meta>
      <profile value="http://hl7.org/fhir/StructureDefinition/shareablevalueset"/>
   </meta>
   <text>
      <status value="generated"/>
      <div xmlns="http://www.w3.org/1999/xhtml">
         <p> Value set *Test name (en). *The name of the imaging examination or procedure performed. (en)</p>
         <p> Developed by: openEHR community</p>
         <p> Generated with LinkEHR</p>
         <p> This value set includes codes from terminology NCRP</p>
         <ul>
            <li>SSC0AA: </li>
         </ul>
      </div>
   </text>
   <url value="http://linkehr.com/fhir/ValueSet-report-v1-_testname_en_-R4"/>
   <version value="20200428"/>
   <name value="*Test name (en)"/>
   <status value="active"/>
   <experimental value="false"/>
   <publisher value="openEHR"/>
   <description value="*The name of the imaging examination or procedure performed. (en)"/>
   <compose>
      <include>
         <system value="http://openehr.org/ckm/archetypes/openEHR-EHR-OBSERVATION.imaging_exam_result.v0"/>
         <concept>
            <code value=""/>
            <display value=""/>
         </concept>
      </include>
   </compose>
</ValueSet>

Example of ValueSet not missing code values:

<?xml version="1.0" encoding="UTF-8"?>
<ValueSet xmlns="http://hl7.org/fhir">
   <id value="ValueSet-report-v1-erdetnoentilstandertilstede_-R4"/>
   <meta>
      <profile value="http://hl7.org/fhir/StructureDefinition/shareablevalueset"/>
   </meta>
   <text>
      <status value="generated"/>
      <div xmlns="http://www.w3.org/1999/xhtml">
         <p> Value set Er det noen tilstander tilstede?. Tilstedeværelse av relevante tilstander.</p>
         <p> Developed by: openEHR community</p>
         <p> Generated with LinkEHR</p>
         <p> This value set includes codes from archetype openEHR-EHR-COMPOSITION.report.v1 internal terminology</p>
         <ul>
            <li>at0031: Tilstede</li>
            <li>at0032: Fraværende</li>
            <li>at0033: Ukjent</li>
         </ul>
      </div>
   </text>
   <url value="http://linkehr.com/fhir/ValueSet-report-v1-erdetnoentilstandertilstede_-R4"/>
   <version value="20200428"/>
   <name value="Er det noen tilstander tilstede?"/>
   <status value="active"/>
   <experimental value="false"/>
   <publisher value="openEHR"/>
   <description value="Tilstedeværelse av relevante tilstander."/>
   <compose>
      <include>
         <system value="http://openehr.org/ckm/archetypes/openEHR-EHR-OBSERVATION.condition_screening.v0"/>
         <concept>
            <code value="at0031"/>
            <display value="Tilstede"/>
         </concept>
         <concept>
            <code value="at0032"/>
            <display value="Fraværende"/>
         </concept>
         <concept>
            <code value="at0033"/>
            <display value="Ukjent"/>
         </concept>
      </include>
   </compose>
</ValueSet>
2 Likes

Thanks, seems related to external terminologies, I’ll try it with your example :smiley:

2 Likes

Fixed the problem :grinning:
Will be corrected in next version

2 Likes

Just released a new version including fixes to all the above issues :grin:

3 Likes

Thanks, liked the new features like choosing between text and string for DV_TEXT!

Tried a new export and sorry to say still some issues. Using the same OTP I posted previously in the thread: https://arketyper.no/ckm/templates/1078.60.876/opt

I haven’t had time for a thorough scan of the generated Questionnaire, anyway listing some of my findings under.

This part is missing sub items which is in the OTP, there are also other parts of the Questionnaire which are missing sub items:

  <item>
     <linkId value="openEHR-EHR-SECTION.adhoc.v1:at0000"/>
     <text value="Inklusjon"/>
     <type value="group"/>
     <item>
        <linkId value="openEHR-EHR-ADMIN_ENTRY.episode_institution.v0:at0000"/>
        <text value="Omsorgsepisode - institusjon"/>
        <type value="group"/>
     </item>
     <item>
        <linkId value="openEHR-EHR-EVALUATION.problem_diagnosis.v1:at0000"/>
        <text value="Diagnose"/>
        <type value="group"/>
     </item>
  </item>

These items are missing the type attribute (could be the same is true elsewhere in the Questionnaire as well):

         <item>
            <linkId value="openEHR-EHR-OBSERVATION.exposure_assessment.v0:at0000"/>
            <text value="Spørreskjema for eksponering"/>
            <type value="group"/>
            <item>
               <linkId value="openEHR-EHR-OBSERVATION.exposure_assessment.v0:at0002"/>
               <text value="Siste 14 dager"/>
            </item>
            <item>
               <linkId value="openEHR-EHR-OBSERVATION.exposure_assessment.v0:at0002_1"/>
               <text value="På registreringstidspunktet"/>
            </item>
         </item>
2 Likes

Thanks! will review it as soon as possible

1 Like

First one is easily fixable, I forgot to specify how ADMIN_ENTRY must be traversed :see_no_evil:

edit: second one are objects under “name” attribute being generated, which probably shouldn’t (it already uses terminology part of the OPT to put the names in the questionnaire object)

1 Like

Does that mean both of them are easily fixable? :slight_smile:

1 Like

Think so :smiley:

edit: Squashing the second one right now, pure EVENT classes were not considered yet

1 Like

Just released a new version solving these issues @Kenneth_Myhra
In principle there are no more missing types as the number of type tags equals the linkid ones :slight_smile:

3 Likes

If we would later go by one of the URN suggestions in DV_EHR_URI-related Issues - Specifications - Confluence (atlassian.net) and register the openehr URN, then that uri example could instead be urn:openehr:archetype:openEHR-EHR-OBSERVATION.laboratory_test_result.v1

Context: We are at Karolinska University hospital currently starting to look at two-way conversions between openEHR templates and FHIR Questionnaires for some use cases where we need to use some already available form services. We thus found this thread interesting. If anybody has done more in this area after the posts above, please share your experiences.

2 Likes

Link to a post I made on a similar topic