node
01/08/2024, 7:20 PMValueSet 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.rahul1
01/09/2024, 6:52 AMsystem 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-systemsrahul1
01/09/2024, 6:53 AMnode
01/09/2024, 5:13 PMrelatedperson-relationshiptype value for a RelatedPerson, the client needs to encode the http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype composition:
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.rahul1
01/17/2024, 6:07 AM: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