cqframework / sample-content-ig

Sample Content IG
Apache License 2.0
7 stars 13 forks source link

Measure.liquid: issue with populating direct reference codes. #8

Closed adongare closed 1 year ago

adongare commented 1 year ago

I'm trying to populate the direct reference codes for effectiveDataRequirement library module definition of a measure. My effectiveDataRequirement module definition structure is:

Screen Shot 2023-02-20 at 4 49 32 PM

Following is the code snippet taken from https://github.com/cqframework/sample-content-ig/blob/master/templates/liquid/Measure.liquid#L324

<tr><th><b>display</b></th><th><b>code</b></th><th><b>system</b></th></tr>
{% for extension in contained.extension.where(url = 'http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode') %}
    <tr>
        <td>{{extension.valueCoding.display.escape('html')}}</td>
        <td>{{extension.valueCoding.code}}</td>
        <td>{{extension.valueCoding.version}}</td>
    </tr>
{% endfor %}

looks like there are a couple of issues here:

  1. Instead of extension.valueCoding.xx it should be extension.value.xx- I'm not 100% sure but could someone please clarify if my understanding is correct or if there is some magic happening behind the scene(by liquid or fhirpath engine) and extension.valueCoding.xx is the preferred way?
  2. For 3rd column(<td>), heading is system but <td> prints version. I think it should be: <td>{{extension.value.system}}</td>

Additionally,

  1. Can we remove the requirement for group population description to have content? https://github.com/cqframework/sample-content-ig/blob/master/templates/liquid/Measure.liquid#L228 It is only checking the first population description on the first group even if there can be multiple groups. Perhaps instead this could just hide population description or show a blank description on the population if none exists.
  2. Now we are supporting group-level measure scoring and it can be different for different groups. If group-level scoring is required to be present in human-readable, please add support to display group-level scoring.

CC: @JSRankins

adongare commented 1 year ago

Thank you so much Bryn for fixing these issues. I've tested it and working fine.