FHIR Chat · Definition Problem · implementers

Stream: implementers

Topic: Definition Problem


view this post on Zulip Grahame Grieve (Oct 04 2016 at 23:39):

The definition of required says "To be conformant, instances of this element SHALL include a code from the specified value set". But this is wrong - the element doesn't have to have a value, and so the definition should say "To be conformant, codes in this element SHALL be from the specified value set" - GF#12223

view this post on Zulip Jenni Syed (Oct 04 2016 at 23:50):

@Grahame Grieve This is actually something we just discussed in the DAF group at the WGM and it sounds like many are relying on that SHALL include rather than all SHALL be. This is primarily valueable as the definition for use with codeableConcept: you can include translations, as long as you also include something from that value set. But not all translations must be from that value set. For things like code, the current definition would limit it to a single code that can only be from that value set, right?

view this post on Zulip Grahame Grieve (Oct 05 2016 at 00:10):

yes, ok. my definition was focused only code. let

view this post on Zulip Grahame Grieve (Oct 05 2016 at 00:10):

let's try again:

view this post on Zulip Grahame Grieve (Oct 05 2016 at 01:33):

To be conformant, codes in this element SHALL be from the specified value set. For code, if a value is present, it SHALL be in the value set. For Coding, if a code or a system is present, the code SHALL be in the value set. For a CodeableConcept, if a text and/or at least one coding are present, there SHALL be a code from the specified value set in the codings

view this post on Zulip Grahame Grieve (Oct 05 2016 at 01:33):

not, ah, so brief

view this post on Zulip James Butler (Oct 05 2016 at 01:36):

Correct > brief! This is a useful clarification, thanks.

view this post on Zulip Chris Grenz (Oct 05 2016 at 01:40):

So, for clarity, a "required" binding could be satisfied by an extension (say, the null flavor extension) since only "if a code or a system is present"?

view this post on Zulip Chris Grenz (Oct 05 2016 at 01:42):

Also, does the presence of CodeableConcept.text make any difference to the binding?

view this post on Zulip Grahame Grieve (Oct 05 2016 at 01:42):

that's correct. Unless additional rules are made in a profile, a required binding does not apply if an extension present.

view this post on Zulip Grahame Grieve (Oct 05 2016 at 01:43):

but .text is specifically different - you cannot provide just text with a required binding

view this post on Zulip Chris Grenz (Oct 05 2016 at 01:44):

The extension thing is non-obvious and should be called out (as it should also be in elementdefinition.min where a required element may have only an extension and no value).

view this post on Zulip Chris Grenz (Oct 05 2016 at 01:44):

it's tripped up my devs over and over....

view this post on Zulip Eric Haas (Oct 05 2016 at 16:15):

That does clarify the required binding and is how I understand it. and yes extension are tricky - I think guidance for extensions belongs in the extensibility page and not where define the bindings - it muddies the waters.

view this post on Zulip Jenni Syed (Oct 05 2016 at 16:44):

The .text comment is a complication. So, in essence, if a field is bound as required you are stating that IRL that field can *never* be freetext? (or of a propietary code that cannot be mapped)

view this post on Zulip Grahame Grieve (Oct 05 2016 at 16:45):

that's HL7's standing policy, yes. Which is why we rarely bind clinical content as required.

view this post on Zulip Grahame Grieve (Oct 05 2016 at 16:46):

usually, they are extensible, which means that they can be free text and/or a local code that cannot be mapped

view this post on Zulip Jenni Syed (Oct 05 2016 at 16:46):

There's not a way to bind with that right now, correct? IE: if you can code it, it MUST be in this value set, but freetext allowed if uncodeable. Extensible means you can add outside codes, which may not be what you want.

view this post on Zulip Eric Haas (Oct 05 2016 at 22:29):

in other words you want a binding to say "either these codes or free text"

view this post on Zulip Grahame Grieve (Oct 05 2016 at 22:43):

right now, we don't have a concise way to say that combination. Is there much use case for it?

view this post on Zulip Chris Grenz (Oct 12 2016 at 17:16):

Created a test to validate this behavior on the existing servers. Grahame's is standard? Good thing to clarify!

Text ONLY

<Patient xmlns="http://hl7.org/fhir">
    <id value="test-patient-1" />
    <meta>
        <profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
    </meta>
    <name>
        <text value="Testing, Mrs. Annette M.D."/>
    </name>
    <maritalStatus>
        <text value="Married" />
    </maritalStatus>
</Patient>

http://fhir3.healthintersections.com.au/open: Rejected
http://wildfhir.aegis.net/fhir1-6-0: Accepted (201)
http://fhirtest.uhn.ca/baseDstu3: Accepted (200)
http://spark.furore.com/fhir: Accepted (200)

Code ONLY (no system):

<Patient xmlns="http://hl7.org/fhir">
    <id value="test-patient-1" />
    <meta>
        <profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
    </meta>
    <name>
        <text value="Testing, Mrs. Annette M.D."/>
    </name>
    <maritalStatus>
        <coding>
            <code value="M" />
        </coding>
    </maritalStatus>
</Patient>

http://fhir3.healthintersections.com.au/open: Rejected
http://wildfhir.aegis.net/fhir1-6-0: Accepted (201)
http://fhirtest.uhn.ca/baseDstu3: Accepted (200)
http://spark.furore.com/fhir: Accepted (200)

System ONLY (no code):

<Patient xmlns="http://hl7.org/fhir">
    <id value="test-patient-1" />
    <meta>
        <profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
    </meta>
    <name>
        <text value="Testing, Mrs. Annette M.D."/>
    </name>
    <maritalStatus>
        <coding>
            <system value="http://hl7.org/fhir/v3/MaritalStatus" />
        </coding>
    </maritalStatus>
</Patient>

http://fhir3.healthintersections.com.au/open: Rejected
http://wildfhir.aegis.net/fhir1-6-0: Accepted (201)
http://fhirtest.uhn.ca/baseDstu3: Accepted (200)
http://spark.furore.com/fhir: Accepted (200)

view this post on Zulip Richard Ettema (Oct 12 2016 at 17:45):

@Chris Grenz For wildfhir I currently do not have validation enabled on the resource payload of the create or update operations. I'll let you know when I have that turned on. -Thanks.

view this post on Zulip Grahame Grieve (Oct 12 2016 at 19:46):

All those are not valid, because the marital status binding is required.

view this post on Zulip Grahame Grieve (Oct 12 2016 at 19:47):

there is at least one task for PA to fix the definition of Marital status to be a code or not a required binding

view this post on Zulip Chris Grenz (Oct 12 2016 at 21:19):

Good, I interpreted correctly! Only your server is rejecting them today. Richard mentioned that Wildfhir isn't doing validation, so that makes sense. But I think the others are - they rejected a bogus gender code.

view this post on Zulip Chris Grenz (Oct 12 2016 at 21:20):

Not trying to call anyone out on their implementation! Just using the implementations as a test to determine how consistently we're all interpreting the standard.

view this post on Zulip Grahame Grieve (Oct 12 2016 at 21:22):

hapi should be the same, since it's using my validator underneath

view this post on Zulip Chris Grenz (Oct 12 2016 at 21:23):

hmmm...not what I saw today

view this post on Zulip Chris Grenz (Oct 12 2016 at 21:23):

Maybe my assumption of validation on write is bogus

view this post on Zulip Martijn Harthoorn (Oct 13 2016 at 09:40):

Chris, spark currently is not doing validation. Only what the parser can not deal with is rejected. We will have validation re-enabled soon.

view this post on Zulip Kevan Riley (Oct 18 2016 at 03:11):

Hi Chis,

view this post on Zulip Kevan Riley (Oct 18 2016 at 03:12):

Were you able to get any Patient Resource with MaritalStatus to post agaist Health Intersectiosn server?

view this post on Zulip Kevan Riley (Oct 18 2016 at 03:17):

If a take a Patient Resource that validates ok on HealthIntersections, and add the following, I get erros aobut the Code:

view this post on Zulip Kevan Riley (Oct 18 2016 at 03:18):

<maritalStatus>
<coding>
<system value="http://hl7.org/fhir/marital-status" />
<code value="T" />
</coding>
<text value="Domestic Partner" />
</maritalStatus>

view this post on Zulip Kevan Riley (Oct 18 2016 at 03:22):

(I also updated the Coding.System value to "http://hl7.org/fhir/ValueSet/marital-status", still "None of the codes provided are in the value set... blah blah blah...)

view this post on Zulip Igor Sirkovich (Oct 18 2016 at 18:12):

I think the system is supposed to be "http://hl7.org/fhir/v3/MaritalStatus" - it should be an URI for the code system rather than for the value set.

view this post on Zulip Grahame Grieve (Oct 18 2016 at 19:45):

right. that shouldn't change the outcome

view this post on Zulip Jenni Syed (Oct 20 2016 at 17:21):

@Grahame Grieve to Use case for "required to be from this value set, unless uncoded/freetext". That is most of the Argonaut profiles. EG: a vital sign must have a loinc code unless it's freetext. Allergy must be RxNorm, NDF-RT, SNOMED unless freetext, etc

view this post on Zulip Jenni Syed (Oct 20 2016 at 17:22):

DataAbsentReason for most of Argonaut is only brought in on value[x] type fields

view this post on Zulip Grahame Grieve (Oct 20 2016 at 19:35):

Why don't the argonaut profiles allow for local codes?

view this post on Zulip Jenni Syed (Oct 20 2016 at 20:43):

I'm guessing because in the grand scheme of integration, those aren't usually very helpful for a realtime app that wants to run on multiple vendor systems

view this post on Zulip Jenni Syed (Oct 20 2016 at 20:43):

It doesn't prevent them - requried means you could add a local as long as you have one from the required. But they don't help much from a interop side

view this post on Zulip Jenni Syed (Oct 20 2016 at 20:43):

Also, some of these are *truely* freetext in the source system - not coded

view this post on Zulip Grahame Grieve (Oct 20 2016 at 20:46):

Agree that sometimes these are truly free text

view this post on Zulip Grahame Grieve (Oct 20 2016 at 20:47):

and I agree that local codes are not usually helpful. but this is not the same as 'not helpful', and I don't see that there's a reason to prohibit them

view this post on Zulip Grahame Grieve (Oct 20 2016 at 20:47):

so this is just a standard extensibole binding then

view this post on Zulip Eric Haas (Oct 20 2016 at 21:09):

To clarify the Argo discussion. We define a lot of extensible and required binding with standard codes. We also clarified that free text only is OK for extensible. ( Because the core is unclear on this ) We did not say anything about this for required bindings. and so the "use this code or free text" discussion here is new. And translation were always allowed. @Jenni Syed is this something we need to address on the next argo call. Do we need a
Freetextonly extension for required?

view this post on Zulip Grahame Grieve (Oct 20 2016 at 21:11):

required does not allow free text. It has to be coded. Except if you have extensions... maybe there's a problem there. And did you create a task about the lack of clarity?

view this post on Zulip Jenni Syed (Oct 20 2016 at 21:11):

@Eric Haas I think we've clarified where text only is required, may want a quick inventory of what we're defining extensible vs. required so we know where the 'freetext' isn't really allowed by core FHIR. I would hate to add an extension to cover this use case, so maybe it becomes extensible? but then we can't require the specific coding without an invariant.

view this post on Zulip Grahame Grieve (Oct 20 2016 at 21:13):

would like to know the use cases for 'required or text'?

view this post on Zulip Eric Haas (Oct 20 2016 at 21:13):

OK I'll do the inventory, make the task for more clarity in core and I don't know you mean by the invariant

view this post on Zulip Jenni Syed (Oct 20 2016 at 21:15):

Yeah @Grahame Grieve it's probably just extensible and they can provide a local code if they want. We just avoided the local code conversation I believe there since it didn't help solve some of the use cases/concerns

view this post on Zulip Eric Haas (Oct 20 2016 at 21:15):

If the EHR only has free text for an element with a required binding . e.g medication code as a hypothetical example

view this post on Zulip Jenni Syed (Oct 20 2016 at 21:16):

I may have to re-review our internal "required" bindings b/c the freetext limitation was not something I was aware of


Last updated: Apr 12 2022 at 19:14 UTC