Getting 500 Error while creating an Allergy

124 views
Skip to first unread message

tri...@cura.tech

unread,
Feb 22, 2017, 6:21:52 AM2/22/17
to Cerner FHIR Developers
Hi:

I am getting 500 Internal Server Error while creating an allergy.. Here is the post data:
{
  "category": "food",
  "status": "active",
  "substance": {
    "coding": [
      {
        "code": "160244002",
        "system": "http://hl7.org/fhir/ValueSet/allergyintolerance-substance-code"
      }
    ]
  },
  "patient": {
    "reference": "Patient/4596007"
  },
  "criticality": "CRITL",
  "resourceType": "AllergyIntolerance",
  "onset": "2017-02-22T11:16:11Z",
  "recordedDate": "2017-02-22T11:16:11Z",
  "type": "allergy"
}


Headers:
< POST /dstu2/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca/AllergyIntolerance HTTP/1.1
< Host: fhir-ehr.sandboxcerner.com
< Connection: keep-alive
< Accept-Encoding: gzip, deflate
< Accept: application/json+fhir
< User-Agent: python-requests/2.10.0
< Accept-Charset: UTF-8
< Content-type: application/json+fhir
< Authorization: Bearer eyJraWQiOiIyMDE3LTAyLTIxVDE5OjI4OjA3LjYwNC5lYyIsInR5cCI6IkpXVCIsImFsZyI6IkVTMjU2In0.eyJzdWIiOiJwb3J0YWwiLCJ1cm46Y29tOmNlcm5lcjphdXRob3JpemF0aW9uOmNsYWltcyI6eyJ2ZXIiOiIxLjAiLCJ0bnQiOiIwYjhhMDExMS1lOGU2LTRjMjYtYTkxYy01MDY5Y2JjNmIxY2EiLCJhenMiOiJvbmxpbmVfYWNjZXNzIHByb2ZpbGUgb3BlbmlkIHVzZXJcL0FsbGVyZ3lJbnRvbGVyYW5jZS5yZWFkIHVzZXJcL0FwcG9pbnRtZW50LnJlYWQgdXNlclwvQmluYXJ5LnJlYWQgdXNlclwvQ29uZGl0aW9uLnJlYWQgdXNlclwvQ29udHJhY3QucmVhZCB1c2VyXC9EZXZpY2UucmVhZCB1c2VyXC9EaWFnbm9zdGljUmVwb3J0LnJlYWQgdXNlclwvRW5jb3VudGVyLnJlYWQgdXNlclwvSW1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0ZW5hbnQiOiIwYjhhMDExMS1lOGU2LTRjMjYtYTkxYy01MDY5Y2JjNmIxY2EifX0.CDeJGjJQhi2GAZJ29_acU_GdoPp4TFGCNKt4cSkTJb6f4SV_dtPUrOolz1N6BL2-7Y2DEu9STmf-tti_Ia7MeQ
< Content-Length: 365
<
< {"category": "food", "status": "active", "substance": {"coding": [{"code": "160244002", "system": "http://hl7.org/fhir/ValueSet/allergyintolerance-substance-code"}]}, "patient": {"reference": "Patient/4596007"}, "criticality": "CRITL", "resourceType": "AllergyIntolerance", "onset": "2017-02-22T11:16:11Z", "recordedDate": "2017-02-22T11:16:11Z", "type": "allergy"}
> HTTP/1.1 500 Internal Server Error
> Date: Wed, 22 Feb 2017 11:16:21 GMT
> Server: Apache
> Cache-Control: no-cache
> Vary: Origin,User-Agent,Accept-Encoding
> Strict-Transport-Security: max-age=631152000
> Server-Response-Time: 453.04421
> X-XSS-Protection: 1; mode=block
> Pragma: no-cache
> X-Request-Id: a94cdc782b194a150127042cbf775ed0
> X-Runtime: 0.453017
> X-Frame-Options: SAMEORIGIN
> X-Content-Type-Options: nosniff
> Expires: Mon, 01 Jan 1990 00:00:00 GMT
> Status: 500 Internal Server Error
> Content-Type: text/plain; charset=utf-8
> Connection: close
> Transfer-Encoding: chunked
>
Internal service error from resource store

Dennis Patterson (Cerner)

unread,
Feb 22, 2017, 9:56:15 AM2/22/17
to Cerner FHIR Developers
Hi Trinadh!  It looks like you're trying to pass a ValueSet as a Code System for the substance.  A ValueSet can contain codes from one or more Code Systems.  If you refer to that ValueSet, it contains snomed codes from the "http://snomed.info/sct" system.  Please update your request body to use that system and give it another shot.

Trinadh Baranika

unread,
Feb 22, 2017, 10:08:19 AM2/22/17
to Dennis Patterson (Cerner), Cerner FHIR Developers
Hi Dennis,

The system was the issue.. Changing to system to http://snomed.info/sct fixed the issue.

Thanks,
Trinadh..

--
You received this message because you are subscribed to a topic in the Google Groups "Cerner FHIR Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cerner-fhir-developers/nIkowzKtwQQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cerner-fhir-developers+unsub...@googlegroups.com.
To post to this group, send email to cerner-fhir-developers@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cerner-fhir-developers/c8b7e4c5-231d-451f-af21-53f8ca0217e5%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Trinadh Baranika

unread,
Feb 22, 2017, 12:56:00 PM2/22/17
to Dennis Patterson (Cerner), Cerner FHIR Developers
Hi Dennis,

I am trying to save a condition. It is failing. I debugged and found that it is failing at two places: Object with category and onsetDateTime. Removing those 2 I am able to save the condition. Can you help me in finding out what is wrong in category & onsetDateTime below?

Thanks
Trinadh..

{
  "category": {
    "coding": [
      {
        "code": "complaint",
        "system": "http://hl7.org/fhir/condition-category"
      }
    ]
  }
,
  "code": {
    "coding": [
      {
        "code": "109006",
        "system": "http://snomed.info/sct"
      }
    ]
  },
  "dateRecorded": "2017-02-22T22:59:16Z",
  "severity": {
    "coding": [
      {
        "code": "399166001",
        "system": "http://snomed.info/sct"
      }
    ]
  },
  "resourceType": "Condition",
  "onsetDateTime": "2017-02-22T23:01:47Z",
  "clinicalStatus": "active",
  "abatementDateTime": "2017-02-22T22:59:46Z",
  "patient": {
    "reference": "Patient/4596007"
  },
  "verificationStatus": "provisional",
  "bodySite": [
    {
      "coding": [
        {
          "code": "106004",
          "system": "http://snomed.info/sct"
        }
      ]
    },
    {
      "coding": [
        {
          "code": "107008",
          "system": "http://snomed.info/sct"
        }
      ]
    }
  ]
}

To unsubscribe from this group and all its topics, send an email to cerner-fhir-developers+unsubscri...@googlegroups.com.

To post to this group, send email to cerner-fhir-developers@googlegroups.com.

Jenni Syed (Cerner)

unread,
Feb 22, 2017, 1:45:08 PM2/22/17
to Cerner FHIR Developers, dennis.r....@gmail.com
Trinadh,

Generally, if you get a 4xx response there will be a reason in the response body you should be able to see in debugging. For the category, the error was "Unsupported category code supplied." This is because "complaint" is not one of the categories that we support, as documented on our terminology bindings: http://fhir.cerner.com/dstu2/condition/#terminology-bindings

I haven't found the error for the onset (on Conditions) - can you tell me what the X-Request-Id header was in the response? I will say that having an onset that is set after the abatement would be unexpected.

~ Jenni

Trinadh Baranika

unread,
Feb 23, 2017, 12:14:55 AM2/23/17
to Jenni Syed (Cerner), Cerner FHIR Developers, Dennis Patterson (Cerner)
Hi Jenni,

I am making changes to include only diagnosis as possible value since according to the Cerner spec it supports only diagnosis and problem codes are supported. From fhir documentation referred in the same (http://hl7.org/fhir/DSTU2/valueset-condition-category.html) I do not see problem as one of the possible value.

I tried changing onsetDateTime from timestamp to date and it worked.. So I want to check if onsetDateTime is just Date or timestamp is also supported?

Thanks
Trinadh..

--
You received this message because you are subscribed to a topic in the Google Groups "Cerner FHIR Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cerner-fhir-developers/nIkowzKtwQQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cerner-fhir-developers+unsub...@googlegroups.com.

To post to this group, send email to cerner-fhir-developers@googlegroups.com.

Dennis Patterson (Cerner)

unread,
Feb 23, 2017, 9:54:11 AM2/23/17
to Cerner FHIR Developers
Hi Trinadh,

'problem' is a code defined by Argonaut that we support, but isn't part of the standard FHIR ValueSet for condition category

onsetDateTime should support timestamps.  Your previous example had an onsetDateTime that looked ok.  What are you passing in that results in a 400?

tri...@cura.tech

unread,
May 4, 2017, 9:22:07 AM5/4/17
to cerner-fhir...@googlegroups.com
Hi Dennis,

Below are a couple of x-request-ids and the posted Json that is failing for AllergyIntolerance with error: 500 Internal service error from resource store

Thanks
Trinadh..

X-Request-Id: b1024df2afcdebcca94135d10d7cd1b0
Posted Json:
{
  "category": "environment",
  "status": "active",
  "substance": {
    "text": "NKA"
  },
  "patient": {
    "reference": "Patient/123456"
  },
  "resourceType": "AllergyIntolerance",
  "recordedDate": "2017-05-04T12:32:23Z"
}

X-Request-Id: f7f3a19a11df3652047830a25b7f4770
Posted Json:
{
  "category": "medication",
  "status": "active",
  "substance": {
    "coding": [
      {
        "code": "5956",
        "system": "http://www.nlm.nih.gov/research/umls/rxnorm"
      }
    ]
  },
  "patient": {
    "reference": "Patient/123456"
  },
  "resourceType": "AllergyIntolerance",
  "recordedDate": "2017-05-04T12:36:48Z"

}

On Thursday, February 23, 2017 at 8:24:11 PM UTC+5:30, Dennis Patterson (Cerner) wrote:
Hi Trinadh,

'problem' is a code defined by Argonaut that we support, but isn't part of the standard FHIR ValueSet for condition category

onsetDateTime should support timestamps.  Your previous example had an onsetDateTime that looked ok.  What are you passing in that results in a 400?

On Wednesday, February 22, 2017 at 11:14:55 PM UTC-6, Trinadh Baranika wrote:
Hi Jenni,

I am making changes to include only diagnosis as possible value since according to the Cerner spec it supports only diagnosis and problem codes are supported. From fhir documentation referred in the same (http://hl7.org/fhir/DSTU2/valueset-condition-category.html) I do not see problem as one of the possible value.

I tried changing onsetDateTime from timestamp to date and it worked.. So I want to check if onsetDateTime is just Date or timestamp is also supported?

Thanks
Trinadh..
On Thu, Feb 23, 2017 at 12:15 AM, Jenni Syed (Cerner) <jenni...@cerner.com> wrote:
Trinadh,

Generally, if you get a 4xx response there will be a reason in the response body you should be able to see in debugging. For the category, the error was "Unsupported category code supplied." This is because "complaint" is not one of the categories that we support, as documented on our terminology bindings: http://fhir.cerner.com/dstu2/condition/#terminology-bindings

I haven't found the error for the onset (on Conditions) - can you tell me what the X-Request-Id header was in the response? I will say that having an onset that is set after the abatement would be unexpected.

~ Jenni

--
You received this message because you are subscribed to a topic in the Google Groups "Cerner FHIR Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cerner-fhir-developers/nIkowzKtwQQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cerner-fhir-developers+unsub...@googlegroups.com.
To post to this group, send email to cerner-fhir...@googlegroups.com.

Jenni Syed (Cerner)

unread,
May 4, 2017, 9:30:00 AM5/4/17
to Cerner FHIR Developers
Trinadh,

I believe they are trying to finish up mappings for the environment you're in. Have you been told the environment is fully ready for writes yet?

I'll also double-check on our side, as I know there's an issue tracking the setup.

~ Jenni
Reply all
Reply to author
Forward
0 new messages