FHIR Chat · LOINC validation · hapi

Stream: hapi

Topic: LOINC validation


view this post on Zulip Connor Wiegmink (Sep 18 2020 at 01:34):

Hi,
I'm trying to create a QuestionnaireResponse resource with answers that reference the LOINC code system. However, when I try to validate the resource using a HAPI FHIR server (using the UI if that makes a difference), it's returning errors for every answer, like this:

"Unknown code {http://loinc.org}LA6154-4 for 'http://loinc.org#LA6154-4'".

The code definitely exists (https://fhir.loinc.org/CodeSystem/$lookup?system=http://loinc.org&code=LA6154-4).
Any ideas what could be causing this? Here is the questionnaire response resource I'm using:

{
    "resourceType" : "QuestionnaireResponse",
    "questionnaire" : "http://hl7.org/fhir/Questionnaire/K10_kessler_psychological_distress_scale",
    "status" : "completed",
    "subject" : {
        "reference": "http://hl7.org/fhir/Patient/1",
        "type": "Patient"
     },
    "authored" : "2018-02-19T14:15:00+10:00",
    "author" : {
        "reference": "http://hl7.org/fhir/Practitioner/example",
        "type": "Practitioner"
     },
    "source" : {
        "reference": "http://hl7.org/fhir/Patient/1",
        "type": "Patient"
    },
    "item": [
        {
            "linkId": "1",
            "text": "During the last 30 days, about how often did you feel tired out for no good reason?",
            "answer": [
                {
                    "valueCoding": {
                        "system": "http://loinc.org",
                        "code": "LA6154-4"
                    }
                }
            ]
        },
        {
            "linkId": "2",
            "text": "During the last 30 days, about how often did you feel nervous?",
            "answer": [
                {
                    "valueCoding": {
                        "system": "http://loinc.org",
                        "code": "LA14732-4"
                    }
                }
            ]
        },
        {
            "linkId": "3",
            "text": "During the last 30 days, about how often did you feel so nervous that nothing could calm you down?",
            "answer": [
                {
                    "valueCoding": {
                        "system": "http://loinc.org",
                        "code": "LA14732-4"
                    }
                }
            ]
        },
        {
            "linkId": "4",
            "text": "During the last 30 days, about how often did you feel hopeless?",
            "answer": [
                {
                    "valueCoding": {
                        "system": "http://loinc.org",
                        "code": "LA14734-0"
                    }
                }
            ]
        },
        {
            "linkId": "5",
            "text": "During the last 30 days, about how often did you feel restless or fidgety?",
            "answer": [
                {
                    "valueCoding": {
                        "system": "http://loinc.org",
                        "code": "LA14732-4"
                    }
                }
            ]
        },
        {
            "linkId": "6",
            "text": "During the last 30 days, about how often did you feel so restless you could not sit still?",
            "answer": [
                {
                    "valueCoding": {
                        "system": "http://loinc.org",
                        "code": "LA6297-1"
                    }
                }
            ]
        },
        {
            "linkId": "7",
            "text": "During the last 30 days, about how often did you feel depressed?",
            "answer": [
                {
                    "valueCoding": {
                        "system": "http://loinc.org",
                        "code": "LA14732-4"
                    }
                }
            ]
        },
        {
            "linkId": "8",
            "text": "During the last 30 days, about how often did you feel that everything was an effort?",
            "answer": [
                {
                    "valueCoding": {
                        "system": "http://loinc.org",
                        "code": "LA6297-1"
                    }
                }
            ]
        },
        {
            "linkId": "9",
            "text": "During the last 30 days, about how often did you feel so sad that nothing could cheer you up?",
            "answer": [
                {
                    "valueCoding": {
                        "system": "http://loinc.org",
                        "code": "LA14732-4"
                    }
                }
            ]
        },
        {
            "linkId": "10",
            "text": "During the last 30 days, about how often did you feel worthless?",
            "answer": [
                {
                    "valueCoding": {
                        "system": "http://loinc.org",
                        "code": "LA14732-4"
                    }
                }
            ]
        }
    ]
}

Last updated: Apr 12 2022 at 19:14 UTC