Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>FHIR Snippets in XMLNew to Visual Studio Code? Get it now.
FHIR Snippets in XML

FHIR Snippets in XML

Rob Eastwood

|
197 installs
| (0) | Free
Lots of fun creating FHIR instances in xml
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

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:

  1. learning
  2. always seeking efficiencies
  3. 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

  1. Within an empty file of type .xml
  2. Invoke the list of available snippets as a pop up by
    1. pressing Ctrl + Space
    2. opening the command palette (Ctrl + Shift + p), type 'snippet' and choose 'insert snippet'
    3. pressing Shift + Alt + s
  3. Scroll the list or start typing characters from the prefixes listed in the tables below
  4. Eg to filter the snippets to those related to AU Base profiles, type aubase or to find all Identifiers, type identifier or part thereof
  5. Scroll down to one of the choices and hit enter, upon which the specific XML nodes are added
  6. 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:

Snippet Name Prefix Aligns to structure
Example FHIR HealthcareService core spec HealthcareService-corespec Core R4 HealthcareService
Example FHIR HealthcareService AU Base HealthcareService-aubase AU Base HealthcareService
Example FHIR HealthcareService AU Core HealthcareService-aucore AU Core HealthcareService
Example FHIR HealthcareService PCA HealthcareService-pca PCA Healthcare Service

Identifier types

The following Identifier types pertinent for the HealthcareService resource in an Australian context are supported:

Snippet Name Prefix Aligns to structure
HealthcareService-Identifier-Residential Aged Care Service Identifier HealthcareService-Identifier-ResidentialAgedCareServiceIdentifier AU Residential Aged Care Service Identifier
HealthcareService-Identifier-HPI-O HealthcareService-Identifier-HPI-O and hpio AU HPI-O Identifier
HealthcareService-Identifier-PCAHSI HealthcareService-Identifier-pcahsi PCA Healthcare Service Identifier

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:

Snippet Name Prefix Aligns to structure
Location-Identifier-Location Specific Practice Number Location-Identifier-LocationSpecificPracticeNumber Location Specific Practice Number Identifier
Location-Identifier-NATA Site Number Location-Identifier-NATASiteNumber AU NATA Site Number Identifier
Location-Identifier-Delivery Point Identifier Location-Identifier-dpid AU Delivery Point Identifier
Location-Identifier-Geocoded National Address File Location-Identifier-gnaf AU G-NAF Identifier

Organization

Resource flavours

The following flavours of the Organization resource are supported:

Snippet Name Prefix Aligns to structure
Example FHIR Organization core spec Organization-corespec Core R4 Organization
Example FHIR Organization AU Base Organization-aubase AU Base Organization
Example FHIR Organization AU Core Organization-aucore AU Core Organization
Example FHIR Organization AU PD Organization-aupd AU PD Organization
Example FHIR Organization PCA Organization-pca PCA Organization

Identifier types

The following Identifier types pertinent for the Organization resource in an Australian context are supported:

Snippet Name Prefix Aligns to structure
Organization-Identifier-HPI-O Organization-Identifier-HPI-O and hpio AU HPI-O Identifier
Organization-Identifier-PAI-O Identifier Organization-Identifier-PAI-O and paio AU PAI-O Identifier
Organisation-Identifier-CSP Registration Number Organisation-Identifier-CSPRegistrationNumber and csp AU CSP Registration Number
Organization-Identifier-Australian Business Number Organization-Identifier-AustralianBusinessNumber and abn AU Australian Business Number
Organization-Identifier-Australian Company Number Organization-Identifier-AustralianCompanyNumber and acn AU Australian Company Number
Organization-Identifier-Australian Registered Body Number Organization-Identifier-AustralianRegisteredBodyNumber and arbn AU Australian Registered Body Number
Organization-Identifier-NATA Accreditation Number Organization-Identifier-NATAAccreditationNumber AU NATA Accreditation Number
Organization-Identifier-Pharmacy Approval Number Organization-Identifier-PharmacyApprovalNumber AU Pharmacy Approval Number

Patient

Resource flavours

The following flavours of the Patient resource are supported:

Snippet Name Prefix Aligns to structure
Example FHIR Patient core spec Patient-corespec Core R4 Patient
Example FHIR Patient AU Base Patient-aubase AU Base Patient
Example FHIR Patient AU Core Patient-aucore AU Core Patient

Identifier types

The following Identifier types pertinent for the Patient resource in an Australian context are supported:

Snippet Name Prefix Aligns to structure
Patient-Identifier-IHI Patient-Identifier-IHI and ihi AU IHI
Patient-Identifier-MedicareNumber Patient-Identifier-Medicare AU Medicare Card Number
Patient-Identifier-DVA Patient-Identifier-DVA AU DVA Number
Patient-Identifier-healthcarecardnumber Patient-Identifier-healthcarecardnumber AU Health Care Card Number
Patient-Identifier-pensionerconcessioncardnumber Patient-Identifier-pensionerconcessioncardnumber and pen AU Pensioner Concession Card Number
Patient-Identifier-commonwealthseniorshealthcardnumber Patient-Identifier-commonwealthseniorshealthcardnumber and csn AU Commonwealth Seniors Health Card Number
Patient-Identifier-medicalrecordnumber-hpioscoped Patient-Identifier-medicalrecordnumber-hpioscoped, mrn and hpio AU Medical Record Number
Patient-Identifier-medicalrecordnumber-abnscoped Patient-Identifier-medicalrecordnumber-abnscoped, mrn and abn AU Medical Record Number
Patient-Identifier-insurancemembernumber Patient-Identifier-insurancemembernumber AU Insurance Member Number

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:

Snippet Name Prefix Aligns to structure
Example FHIR PractitionerRole core spec PractitionerRole-corespec Core R4 PractitionerRole
Example FHIR PractitionerRole AU Base PractitionerRole-aubase AU Base PractitionerRole
Example FHIR PractitionerRole AU Core PractitionerRole-aucore AU Core PractitionerRole

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

RelatedPerson

Resource flavours

The following flavours of the RelatedPerson resource are supported:

Snippet Name Prefix Aligns to structure
Example FHIR RelatedPerson core spec RelatedPerson-corespec Core R4 RelatedPerson
Example FHIR RelatedPerson AU Base RelatedPerson-aubase AU Base RelatedPerson
Example FHIR RelatedPerson AU Core RelatedPerson-aucore AU Core RelatedPerson

Identifier types

All of the Australian context Patient related Identifier types can also be used in RelatedPerson resources. See above.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft