sync-for-science / tracking

Issue tracking for S4S reference stack development
0 stars 0 forks source link

Ensure that "value" is present on observations #120

Closed jmandel closed 6 years ago

jmandel commented 7 years ago

E.g. the following vital sign Observation should be rejected:

 {
            "resource":{
                "resourceType":"Observation",
                "id":"2",
                "text":{
                    "status":"generated",
                    "div":"<div xmlns=\"http://www.w3.org/1999/xhtml\">2017-09-08:Height66 in</div>"
                },
                "status":"final",
                "category":{
                    "coding":[
                        {
                            "system":"http://hl7.org/fhir/observation-category",
                            "code":"vital-signs",
                            "display":"Vital Signs"
                        }
                    ],
                    "text":"vital-signs"
                },
                "code":{
                    "coding":[
                        {
                            "system":"http://loinc.org",
                            "code":"8302-2",
                            "display":"height"
                        }
                    ],
                    "text":"Height"
                },
                "subject":{
                    "reference":"Patient/82802"
                },
                "effectiveDateTime":"2017-09-08"
            }
        },
mtmcduffie commented 7 years ago

Are things like this value missing a warning or an error?

jmandel commented 7 years ago

teeeechnically it's legal, which would make it a warning. But our Test Suite should just call it an error, since it's a very bad problem that shouldn't get swept under the rug with a pile of much-less-severe warnings.

jmandel commented 7 years ago

The check we'd want to do is:

Ensure that at least one of the following is present:

jmandel commented 7 years ago

Thanks @mtmcduffie!