$expand operation expand given ValueSet in to set of concepts. For more information, see the official documentation FHIR Terminology ValueSet Expansion
GET [base]/ValueSet/$expand?url=http://hl7.org/fhir/ValueSet/administrative-gender
Or
POST [base]/ValueSet/$expandcontent-type:text/yamlresourceType:Parametersparameter:- {name:url,valueUri:'http://hl7.org/fhir/ValueSet/administrative-gender'}
A text filter that is applied to restrict the codes
GET [base]/ValueSet/administrative-gender/$expand?filter=male
Or
POST [base]/ValueSet/administrative-gender/$expandcontent-type:text/yamlresourceType:Parametersparameter:- {name:filter,valueString:male}
id:administrative-genderresourceType:ValueSeturl:http://hl7.org/fhir/ValueSet/administrative-genderdescription:The gender of a person used for administrative purposes.compose:include: - {system:'http://hl7.org/fhir/administrative-gender'}name:AdministrativeGenderexpansion:timestamp:'2018-09-25T16:24:55Z'identifier:http://hl7.org/fhir/ValueSet/administrative-gendercontains: - {code: male, module: fhir-3.3.0, system: 'http://hl7.org/fhir/administrative-gender', display: Male, definition: Male}
- {code: female, module: fhir-3.3.0, system: 'http://hl7.org/fhir/administrative-gender', display: Female, definition: Female}
......
offset
Paging support - where to start if a subset is desired (default = 0).
GET [base]/ValueSet/administrative-gender/$expand?offset=2
Or
POST [base]/ValueSet/administrative-gender/$expandcontent-type:text/yamlresourceType:Parametersparameter:- {name:offset,valueInteger:2}
id:administrative-genderresourceType:ValueSeturl:http://hl7.org/fhir/ValueSet/administrative-genderdescription:The gender of a person used for administrative purposes.compose:include: - {system:'http://hl7.org/fhir/administrative-gender'}name:AdministrativeGenderexpansion:timestamp:'2018-09-25T16:24:55Z'identifier:http://hl7.org/fhir/ValueSet/administrative-gendercontains: - {code: other, module: fhir-3.3.0, system: 'http://hl7.org/fhir/administrative-gender', display: Other, definition: Other}
- {code: unknown, module: fhir-3.3.0, system: 'http://hl7.org/fhir/administrative-gender', display: Unknown, definition: Unknown}
......
count
Paging support - how many codes should be provided in a partial page view.
GET [base]/ValueSet/administrative-gender/$expand?count=1
Or
POST [base]/ValueSet/administrative-gender/$expandcontent-type:text/yamlresourceType:Parametersparameter:- {name:count,valueInteger:1}
id:administrative-genderresourceType:ValueSeturl:http://hl7.org/fhir/ValueSet/administrative-genderdescription:The gender of a person used for administrative purposes.compose:include: - {system:'http://hl7.org/fhir/administrative-gender'}name:AdministrativeGenderexpansion:timestamp:'2018-09-25T16:24:55Z'identifier:http://hl7.org/fhir/ValueSet/administrative-gendercontains: - {code: male, module: fhir-3.3.0, system: 'http://hl7.org/fhir/administrative-gender', display: Male, definition: Male}
......
activeOnly
Controls whether inactive concepts are included or excluded in value set expansions.
For example, we create a testing ValueSet with one current active concept and one deprecated concept provided directly as a part of the request.
Get all concepts
POST [base]/ValueSet/$expandcontent-type:text/yamlresourceType:Parametersparameter:- {name:activeOnly,valueBoolean:false}- name:valueSetresource:resourceType:ValueSeturl:http://custom/testingcompose:include: - system:http://testingconcept: - {code:active} - {code:inactive,deprecated:true}