Is a ValueSet url as a Coding `system` considered...
# support
n
Can a
ValueSet
URL be used in place of a
CodeSystem
? For instance, I'd like to use http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype for a
RelatedPerson
relationship but the
system
coming back from the
CodeInput
results are on of the composed `CodeSystem`'s and as such, I'd need some client logic to check and find the relationship by understanding `relatedperson-relationshiptype`'s composition. Alternatively, I could just hardcode the relationship->coding->system to http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype but I'm not sure if this is a valid use of the
system
field for a
Coding
value.
r
In general, it's considered a bit of an anti-pattern to use the ValueSet URL as the system string. The
system
is very much meant to identify the standardized coding system from which the value was taken. There is a many to many relationship between
ValueSets
and
CodeSystems
- a
ValueSet
can include values from multiple
CodeSystems
, and the
CodeSystem
share values with multiple
ValueSets
Some more info on system strings here: https://www.medplum.com/blog/demystifying-fhir-systems
I'm not sure I quite understand the mapping table you would like to keep. Do you mind sharing an example?
n
Ya so in order for my client application to extract the
relatedperson-relationshiptype
value for a
RelatedPerson
, the client needs to encode the http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype composition:
Copy code
System http://terminology.hl7.org/CodeSystem/v2-0131
System http://terminology.hl7.org/CodeSystem/v3-RoleCode
  Filter
    Property concept
    Op is-a
    Value _PersonalRelationshipRoleType
So I would have to search through
RelatedPerson.relationship.coding
and check for system
http://terminology.hl7.org/CodeSystem/v2-0131
or
http://terminology.hl7.org/CodeSystem/v3-RoleCode
where the filter matches To simplify the client lookup, I just hardcode the system to http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype which felt wrong from a FHIR standpoint (because this is not a standard CodeSystem) but also makes the clients job much easier as it just needs to search
relationship.coding
for the system
http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype
.
r
HI @node , I understand the problem here and understand the challenge. I've been looking for an elegant solution for you. I do have some thoughts here, but nothing that is the most elegant. Given that, I'll concede that using the ValueSet URL might be the way to go. 1. The right way to do this would be to use the
:in
search parameter - you can query if a certain code is in a valuset. However, you would have to mak an API call for each check, which is much more inefficient 2. You could also use the
CodeSystem/$lookup
operation on any codes from http://terminology.hl7.org/CodeSystem/v3-RoleCode/ . This operation returns all properties of a given code, including whether or not the code
isa _PersonalRelationshipRoleType
. Again, however, this requires an API lookup https://build.fhir.org/terminology-service.html#lookup
157 Views