Create Encounter Error [r4] Request: edbd83e30c5c87c84747fef26efa11ae

106 views
Skip to first unread message

Felipe Ramos

unread,
Apr 15, 2020, 4:49:45 AM4/15/20
to Cerner FHIR Developers
Not having much luck creating an encounter after trying several combinations 


Request:

{
  "resourceType": "Encounter",
  "status": "in-progress",
  "type": [
    {
      "coding": [
        {
          "code": "309310"
        }
      ]
    }
  ],
  "priority": {
    "coding": [
      {
        "code": "0"
      }
    ]
  },
  "identifier": [
    {
      "use": "usual",
      "type": {
        "coding": [
          {
            "code": "1077"
          }
        ]
      },
      "value": "995345",
      "system": "urn:oid:3.3.3.3.3.3"
    }
  ],
  "subject": {
    "reference": "Patient/7362007"
  },
  "reasonCode": [
    {
      "text": "CONTACT INFO:\r\nName: JOSHUA SMART\r\nPhone 1: (303) 875-2004\r\n\r\nA:\r\nPROTOCOLS Other\r\n\r\nP:\r\n* Sent to ER where? ___________\r\n* Sent to UC where? ___________\r\n\r\nS:\r\ntest\r\n\r\nO:\r\n-------------------------------------------------------\r\n-------------------------------------------------------\r\n-------------------------------------------------------\r\n\r\n        TRIAGE LEVEL:\r\nLevel 5 No Health Issue\r\n\r\n        ENCOUNTER FORWARDINGS:\r\nForwarded from Felipe Ramos to  on 04/14/2020 at 5:15 PM\r\n\r\n\r\n        ASSIGNED TO/CLOSED BY:\r\nFelipe Ramos @ 04/15/20 04:46:40 AM\r\n\r\nINTERVIEW CONDUCTED BETWEEN:\r\n04/14/20 05:13:20 PM and 04/14/20 05:15:56 PM by Felipe Ramos (RN)"
    }
  ],
  "serviceProvider": {
    "reference": "Organization/619848"
  },
  "period": {
    "start": "2020-04-14T21:13:20.000Z",
    "end": "2020-04-15T08:46:54.277Z"
  }
}


Response: {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invalid","details":{"text":"Invalid request"}}]}

Benjamin Eichhorn (Cerner)

unread,
Apr 15, 2020, 9:09:24 AM4/15/20
to Cerner FHIR Developers
Hi,

The code you provided for Encounter.priority is not valid for the given system. Please see the value set defined in the FHIR spec https://www.hl7.org/fhir/dstu2/valueset-encounter-priority.html for a list of codes you can use for that system. 

Thanks,
Ben (Cerner)

Felipe Ramos

unread,
Apr 15, 2020, 10:31:53 AM4/15/20
to Cerner FHIR Developers
Hi Benjamin, 

Much appreciated - I updated the payload based on your feedback but still getting 400.

RequestId: efc0d9f1c969302bc509967e91edfc4a

Request:

{
  "resourceType": "Encounter",
  "status": "in-progress",
  "type": [
    {
      "coding": [
        {
          "code": "309310"
        }
      ]
    }
  ],
  "priority": {
    "coding": [
      {
        "code": "imm"
      }
    ]
  },
  "identifier": [
    {
      "use": "usual",
      "type": {
        "coding": [
          {
            "code": "1077"
          }
        ]
      },
      "value": "995345",
      "system": "urn:oid:3.3.3.3.3.3"
    }
  ],
  "subject": {
    "reference": "Patient/7362007"
  },
  "reasonCode": [
    {
      "text": "CONTACT INFO:\r\nName: JOSHUA SMART\r\nPhone 1: (303) 875-2004\r\n\r\nA:\r\nPROTOCOLS Other\r\n\r\nP:\r\n* Sent to ER where? ___________\r\n* Sent to UC where? ___________\r\n\r\nS:\r\ntest\r\n\r\nO:\r\n-------------------------------------------------------\r\n-------------------------------------------------------\r\n-------------------------------------------------------\r\n\r\n        TRIAGE LEVEL:\r\nLevel 5 No Health Issue\r\n\r\n        ENCOUNTER FORWARDINGS:\r\nForwarded from Felipe Ramos to  on 04/14/2020 at 5:15 PM\r\n\r\n\r\n        ASSIGNED TO/CLOSED BY:\r\nFelipe Ramos @ 04/15/20 10:28:59 AM\r\n\r\nINTERVIEW CONDUCTED BETWEEN:\r\n04/14/20 05:13:20 PM and 04/14/20 05:15:56 PM by Felipe Ramos (RN)"
    }
  ],
  "serviceProvider": {
    "reference": "Organization/619848"
  },
  "period": {
    "start": "2020-04-14T21:13:20.000Z",
    "end": "2020-04-15T14:29:16.613Z"
  }
}

Response:

{"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invalid","details":{"text":"Invalid request"}}]}

Felipe Ramos

unread,
Apr 15, 2020, 10:40:22 AM4/15/20
to Cerner FHIR Developers
Also tried it without Priority as my understanding it is optional and got the following:

RequestId: "d79f54245b789a9f1cdad1489d95b35a"

{"resourceType":"OperationOutcome","issue":[{"severity":"fatal","code":"exception","details":{"text":"Internal service error from resource store"}}]}

Benjamin Eichhorn (Cerner)

unread,
Apr 16, 2020, 9:47:41 AM4/16/20
to Cerner FHIR Developers
Hi Felipe,

Apologies for the delay. For the first call you posted, it is again an issue with mappings. I double checked and it looks like, at least in our sandbox domain, that only the "emg", "urg", and "no-urg" code values are mapped. So you'll need to use one of those three codes.

For your second call, where you removed the "priority" field. This is caused by your Encounter.reasonCode field being too long. It looks like you're populating it with RTF which is not advised as that will likely not render correctly in the EHR. The length of contents for the field will need to be reduced significantly for your request to succeed.

Thanks,
Ben (Cerner)

Felipe Ramos

unread,
Apr 16, 2020, 10:42:29 AM4/16/20
to Cerner FHIR Developers
Thank you Benjamin I got a 415 with "no-urg" but was able to create by removing the priority for now.
Reply all
Reply to author
Forward
0 new messages