FHIR Snippets in XML
This extension is a collection of VS Code snippets to create instances of various HL7® FHIR®© resources, aligned to an Australian context.
The primary motivations to develop this extension:
- learning
- always seeking efficiencies
- share with colleagues
FHIR
Refer to the main FHIR specification page https://hl7.org/fhir/R4/index.html
Scope
- support for xml instances only at this time
- FHIR R4 (4.0.1 and probably R4B)
- support for Australian context
Features
This extension supports snippets for
- entire FHIR resource types, such as Patient,
Practitioner,
HealthcareService,
Location,
Organization,
PractitionerRole and
RelatedPerson
- each resource type is represented in a number of 'flavours', that comply
with the core spec as well as various profiles in the Australian context; such
as HL7AU AU Base profiles,
or HL7AU AU Core profiles.
See below for the complete list of supported flavours.
- each of the file snippets represents a complete FHIR resource, with all
mandatory elements and the majority of available optional elements. The
optional elements can then just be deleted as desired to support the scenario
of interest
- snippets complying with AU Core profiles include all mandatory elements and
only optional elements that have must support as true
- the sample values supplied use the string "TODO" to be a prompt for the user
to update with desired values
- where terminology based elements have a discrete list of codes, they are
supported by a drop down pick list in the snippet
- Identifier datatype
nodes, such as IHI or HPI-I identifiers
- Identifier snippets can be inserted into any of the above complete FHIR
resources in the standard element ordering
- Identifier snippets are organised by applicable resource type and closely
follow the definitions in the AU Base Identifier datatype profiles
- see below for a complete list of available Identifier types
Usage
- Within an empty file of type
.xml
- Invoke the list of available snippets as a pop up by
- pressing
Ctrl + Space
- opening the command palette (
Ctrl + Shift + p
), type 'snippet' and
choose 'insert snippet'
- pressing
Shift + Alt + s
- Scroll the list or start typing characters from the prefixes listed in the
tables below
- Eg to filter the snippets to those related to AU Base profiles, type
aubase
or to find all Identifiers, type identifier
or part thereof
- Scroll down to one of the choices and hit enter, upon which the specific XML
nodes are added
- Choose from the available pick lists and update data to support the example scenario
Supported resources
HealthcareService
Resource flavours
The following flavours of the HealthcareService resource are supported:
Identifier types
The following Identifier types pertinent for the HealthcareService resource in
an Australian context are supported:
Location
Resource flavours
The following flavours of the Location resource are supported:
Snippet Name |
Prefix |
Aligns to structure |
Example FHIR Location core spec |
Location-corespec |
Core R4 Location |
Example FHIR Location AU Base |
Location-aubase |
AU Base Location |
Example FHIR Location AU Core |
Location-aucore |
AU Core Location |
Example FHIR Location PCA mobile |
Location-pca-mobile |
PCA Location of type 'mobile' |
Example FHIR Location PCA virtual |
Location-pca-virtual |
PCA Location of type 'virtual' |
Example FHIR Location PCA physical |
Location-pca-physical |
PCA Location of type 'physical' |
Identifier types
The following Identifier types pertinent for the Location resource in an Australian context are supported:
Organization
Resource flavours
The following flavours of the Organization resource are supported:
Identifier types
The following Identifier types pertinent for the Organization resource in an Australian context are supported:
Patient
Resource flavours
The following flavours of the Patient resource are supported:
Identifier types
The following Identifier types pertinent for the Patient resource in an Australian context are supported:
Practitioner
Resource flavours
The following flavours of the Practitioner resource are supported:
| Snippet Name | Prefix | Aligns to structure |
| ------------ | -------- | ----------- |
| Example FHIR Practitioner core spec | Practitioner-corespec
| Core R4 Practitioner |
| Example FHIR Practitioner AU Base | Practitioner-aubase
| AU Base Practitioner |
| Example FHIR Practitioner AU Core | Practitioner-aucore
| AU Core Practitioner |
Identifier types
The following Identifier types pertinent for the Practitioner resource in an Australian context are supported:
Snippet Name |
Prefix |
Aligns to structure |
Practitioner-Identifier-HPI-I |
Practitioner-Identifier-HPI-I and hpii |
AU HPI-I |
Practitioner-Identifier-PBS Prescriber Number |
Practitioner-Identifier-PBSPrescriberNumber |
AU PBS Prescriber Number |
Practitioner-Identifier-Care Agency Employee Identifier |
Practitioner-Identifier-CareAgencyEmployeeIdentifier |
AU Care Agency Employee Identifier |
Practitioner-Identifier-Ahpra Registration Number |
Practitioner-Identifier-AhpraRegistrationNumber |
AU Ahpra Registration Number |
Practitioner-Identifier-PCA Practitioner Identifier |
Practitioner-Identifier--pca-practitioner-identifier |
PCA Practitioner Identifier |
PractitionerRole
Resource flavours
The following flavours of the PractitionerRole resource are supported:
Identifier types
The following Identifier types pertinent for the PractitionerRole resource in an Australian context are supported:
Snippet Name |
Prefix |
Aligns to structure |
PractitionerRole-Identifier-Medicare Provider Number |
PractitionerRole-Identifier-MedicareProviderNumber |
AU Medicare Provider Number |
PractitionerRole-Identifier-Employee Number |
PractitionerRole-Identifier-EmployeeNumber |
AU Employee Number |
PractitionerRole-Identifier-National Provider Identifier At Organisation |
PractitionerRole-Identifier-NationalProviderIdentifierAtOrganisation |
AU National Provider Identifier At Organisation |
Resource flavours
The following flavours of the RelatedPerson resource are supported:
Identifier types
All of the Australian context Patient related Identifier types can also be used in RelatedPerson resources. See above.