0

I had asked a question earlier here, which describes the scenario for the usage of OperationOutcome. The gist is, we would be using OperationOutcome as one of the entries in the searchset to indicate that some of the other entries in the searchset are having some missing fields. Because OperationOutcome.issue.location needs to have a Xpath value pointing to the location of the missing fields, how to write an xpath syntax to describe a json structure when paths can be slightly different.

e.g. XML Response for MedicationOrder

  <entry>
    <resource>
      <MedicationOrder>
        <meta>
          <versionId value="3"/>
        </meta>
        ...
      </MedicationOrder>
    </resource>
  </entry>
  <entry>
    <resource>
      <OperationOutcome>
        ...
      </OperationOutcome>
    </resource>
  </entry>

Json Response for MedicationOrder

   "entry":[{
     "resource":{
        "resourceType":"MedicationOrder",
        "meta": {"versionId":"3"}
        ....
     }},
     {"resource":{
        "resourceType":"OperationOutcome"
         .....
     }}]

OpeartionOutcome.issue.location

OpearationOutcome.issue.location = "/f:Bundle/f:entry[1]/f:resource/f:MedicationOrder/f:meta"

The above are the two responses for the same resource searchset, one in json and one in XML. If an OpearationOutcome entry is also added to the searchset with the json structure and I have to show location of meta in the OperationOutcome.issue.location, I believe I have to use Xpath syntax to point to the location. Since in XML structure MedicationOrder is a node and in Json structure its a field value, is it the correct way of writing location of meta as shown above?

Community
  • 1
  • 1

1 Answers1

0

Looks correct to me. It does have to be XPath. (obviously that's less than ideal, and we're hoping to improve this in the next version

Grahame Grieve
  • 3,538
  • 3
  • 15
  • 17