inferno-framework / fhir-validator-app

A standalone app for validating FHIR resources against an optional Implementation Guide
Apache License 2.0
36 stars 12 forks source link

Bundle.entry[0].resource.addresses[0]: Unrecognised property '@display' is shown, need help on this to rectify #47

Open sid12345620 opened 3 years ago

sid12345620 commented 3 years ago

I am seeing the below issue for CarePlan Resource when we try to validate from FHIR validator

Fhir validator tool used: http://inferno.healthit.gov/validator Version : 1.0.0 Implementation Guide selected from drop down = hl7.fhir.us.core Profile selected from drop down = http://hl7.org/fhir/us/core/StructureDefinition/us-core-careplan

Validation Error message: Bundle.entry[0].resource.addresses[0]: Unrecognised property '@display' on line 102. Jump to error. Bundle.entry[0].resource.addresses[0].reference: This property must be an Object, not a primitive property on line 104. Jump to error. Below is the payload or json response snippet for address data element:

"addresses": [ { "display": "Member may not be receiving appropriate diagnostic testing/monitoring as it relates to gestational diabetes requiring additional care coordination/education", "reference": "Condition/3008838388" } ]

Thanks

yunwwang commented 3 years ago

I tested with this US Core example resource with addresses attribute provided. There is no error reported. Would you mind providing more details?

{
  "resourceType": "CarePlan",
  "id": "colonoscopy",
  "meta": {
    "profile": [
      "http://hl7.org/fhir/us/core/StructureDefinition/us-core-careplan"
    ]
  },
  "text": {
    "status": "additional",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n\t\t\t<strong>Assessment</strong>\n\t\t\t<ol>\n\t\t\t\t<li>Recurrent GI bleed of unknown etiology; hypotension perhaps secondary to this but as likely secondary to polypharmacy.</li>\n\t\t\t\t<li>Acute on chronic anemia secondary to #1.</li>\n\t\t\t\t<li>Azotemia, acute renal failure with volume loss secondary to #1.</li>\n\t\t\t\t<li>Hyperkalemia secondary to #3 and on ACE and K+ supplement.</li>\n\t\t\t\t<li>Other chronic diagnoses as noted above, currently stable.</li>\n\t\t\t</ol>\n\t\t\t<table>\n\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>Planned Activity</th>\n\t\t\t\t\t\t<th>Planned Date</th>\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Colonoscopy</td>\n\t\t\t\t\t\t<td>April 21, 2000</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t</div>"
  },
  "status": "active",
  "intent": "order",
  "category": [
    {
      "coding": [
        {
          "system": "http://hl7.org/fhir/us/core/CodeSystem/careplan-category",
          "code": "assess-plan"
        }
      ]
    }
  ],
  "subject": {
    "reference": "Patient/example",
    "display": "Amy Shaw"
  },
  "addresses": [
    {
      "display": "Member may not be receiving appropriate diagnostic testing/monitoring as it relates to gestational diabetes requiring additional care coordination/education",
      "reference": "Condition/3008838388"
    }
  ]
}
sid12345620 commented 3 years ago

Thanks for the quick response, I am using the drop down options for the below:

Implementation Guide selected from drop down = hl7.fhir.us.core

Profile selected from drop down = http://hl7.org/fhir/us/core/StructureDefinition/us-core-careplan

In this case, I am seeing the error message as mentioned above.

I would like to know, are you also trying with the same way?

Meanwhile, I am attaching the full payload, which may help you in replicating the issue. { "entry": [ { "fullUrl": "https://testserverexample/t/dummytest/fhir/r4/CarePlan/3008838388", "resource": { "id": "3008838388", "language": "en", "meta": { "profile": [ "http://hl7.org/fhir/us/core/StructureDefinition/us-core-careplan" ], "versionId": "1.0" }, "text": { "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">Problem

  • Member may not be receiving appropriate diagnostic testing/monitoring as it relates to gestational diabetes requiring additional care coordination/education
  • ", "status": "generated" }, "activity": [ { "id": "1", "detail": { "description": "Intervention one", "goal": [ { "display": "Test Display", "reference": "Goal/30169909009" } ], "scheduledPeriod": { "start": "2000-03-25" }, "status": "in-progress" } }, { "id": "2", "detail": { "description": "Intervention two", "goal": [ { "display": "Test Display", "reference": "Goal/30169909009" } ], "scheduledPeriod": { "start": "2000-03-25" }, "status": "in-progress" } }, { "id": "3", "detail": { "description": "Intervention three", "goal": [ { "display": "Test Display", "reference": "Goal/30169909009" } ], "scheduledPeriod": { "start": "2000-03-25" }, "status": "in-progress" } }, { "id": "4", "detail": { "description": "Intervention Four", "goal": [ { "display": "Test Display", "reference": "Goal/30169909009" } ], "scheduledPeriod": { "start": "2000-03-25" }, "status": "in-progress" } }, { "id": "5", "detail": { "description": "Intervention Five", "goal": [ { "display": "Test Display", "reference": "Goal/30169909009" } ], "scheduledPeriod": { "start": "2000-03-25" }, "status": "in-progress" } } ], "addresses": [ { "display": "Member may not be receiving appropriate diagnostic testing/monitoring as it relates to gestational diabetes requiring additional care coordination/education", "reference": "Condition/3008838388" } ], "category": [ { "coding": [ { "code": "assess-plan", "system": "http://hl7.org/fhir/us/core/CodeSystem/careplan-category" } ] } ], "goal": [ { "display": "Test Display", "reference": "Goal/30169909009" } ], "intent": "plan", "status": "active", "subject": { "reference": "Patient/123455666987" }, "resourceType": "CarePlan" } } ], "link": [ { "relation": "self", "url": "https://testserverexample/t/dummytest/fhir/r4/CarePlan?patient=123455666987" } ], "total": 1, "type": "searchset", "resourceType": "Bundle" }

    Thanks

    yunwwang commented 3 years ago

    OK I see. You cannot validate as a Bundle. The underly FHIR validator_cli does accept a Bundle as input but the validation of Bundle.entry.resource is not reliable with current version of validator_cli. If you validate the CarePlan resource alone, you have a pass.

    sid12345620 commented 3 years ago

    So, in that case few profiles when I copy paste as a bundle, still they are not showing up this error.

    So is there any chance, in future, we can see support for bundle validations from fhir validator_cli

    Also, please clarify me, still my response pasted above is valid fhir bundle correct?

    Thanks

    On Fri, 26 Mar 2021, 00:57 yunwwang, @.***> wrote:

    OK I see. You cannot validate as a Bundle. The underly FHIR validator_cli does accept a Bundle as input but the validation of Bundle.entry.resource is not reliable with current version of validator_cli. If you validate the CarePlan resource alone, you have a pass.

    — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/inferno-community/fhir-validator-app/issues/47#issuecomment-807331481, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATMVXOGX75NQOFFDCXBZIU3TFOFAPANCNFSM4ZZTDV4A .

    sid12345620 commented 3 years ago

    Thank you!

    On Fri, 26 Mar 2021, 21:09 yunwwang, @.***> wrote:

    After further investigation, we find this is a bug in our validator app. We will fix that asap. At the same time, you can run validate against individual resource entries.

    — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/inferno-community/fhir-validator-app/issues/47#issuecomment-808318510, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATMVXOEHNLY6GQ4ZCMR5LYLTFSTE3ANCNFSM4ZZTDV4A .

    sid12345620 commented 3 years ago

    Hi @yunwwang ,

    Now, today, I revalidated my json response with bundle search, I pasted the response in fhir validator, I am not seeing any validation failure issues now, is the issue fixed?

    Thanks