Skip to content

Commit

Permalink
Add NZ IPS preset (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
dotasek authored Nov 14, 2023
1 parent 95a5e6e commit 0a7e164
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"preset_fhir_resource" : "FHIR Resource -German",
"preset_ips" : "IPS Document -German",
"preset_ips_au" : "Australian IPS Document -German",
"preset_ips_nz" : "New Zealand IPS Document -German",
"present_cda" : "CDA Document -German",
"preset_us_ccda" : "US CCDA Document -German",
"preset_sql_view": "SQL View Definition -German",
Expand Down
1 change: 1 addition & 0 deletions src/commonMain/resources/static-content/polyglot/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
"preset_fhir_resource" : "FHIR Resource",
"preset_ips" : "IPS Document",
"preset_ips_au" : "Australian IPS Document",
"preset_ips_nz" : "New Zealand IPS Document",
"present_cda" : "CDA Document",
"preset_us_ccda" : "US CCDA Document",
"preset_sql_view": "SQL View Definition",
Expand Down
1 change: 1 addition & 0 deletions src/commonMain/resources/static-content/polyglot/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"preset_fhir_resource" : "FHIR Resource -Spanish",
"preset_ips" : "IPS Document -Spanish",
"preset_ips_au" : "Australian IPS Document -Spanish",
"preset_ips_nz" : "New Zealand IPS Document -Spanish",
"present_cda" : "CDA Document -Spanish",
"preset_us_ccda" : "US CCDA Document -Spanish",
"preset_sql_view": "SQL View Definition -Spanish",
Expand Down
29 changes: 29 additions & 0 deletions src/jsMain/kotlin/utils/Preset.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ val IPS_AU_IG = PackageInfo(
"http://hl7.org.au/fhir/ips/ImplementationGuide/hl7.fhir.au.ips"
)

val IPS_NZ_IG = PackageInfo(
"tewhatuora.fhir.nzps",
"current",
"4.0.1",
"https://standards.digital.health.nz/ImplementationGuide/tewhatuora.fhir.ig.fhir-nzps"
)

val CDA_IG = PackageInfo(
"hl7.cda.uv.core",
"2.0.0-sd-ballot",
Expand All @@ -47,6 +54,8 @@ val IPS_BUNDLE_PROFILE = "http://hl7.org/fhir/uv/ips/StructureDefinition/Bundle-

val IPS_AU_BUNDLE_PROFILE = "http://hl7.org.au/fhir/ips/StructureDefinition/Bundle-au-ips"

val IPS_NZ_BUNDLE_PROFILE = "https://standards.digital.health.nz/fhir/StructureDefinition/nzps-bundle"

val IPS_CONTEXT = CliContext()
.setSv("4.0.1")
.addIg(PackageInfo.igLookupString(IPS_IG))
Expand All @@ -69,6 +78,18 @@ val IPS_AU_CONTEXT = CliContext()
.setProfile("http://hl7.org.au/fhir/ips/StructureDefinition/Composition-au-ips")
))

val IPS_NZ_CONTEXT = CliContext()
.setSv("4.0.1")
.addIg(PackageInfo.igLookupString(IPS_NZ_IG))
.setExtensions(listOf(ANY_EXTENSION))
.setCheckIPSCodes(true)
.setBundleValidationRules(listOf(
BundleValidationRule()
.setRule("Composition:0")
.setProfile("https://standards.digital.health.nz/fhir/StructureDefinition/nzps-composition")
))


val CDA_CONTEXT = CliContext()
.setSv("5.0.0")
.addIg(PackageInfo.igLookupString(CDA_IG))
Expand Down Expand Up @@ -113,6 +134,14 @@ enum class Preset(
setOf(ANY_EXTENSION),
setOf(IPS_AU_BUNDLE_PROFILE)
),
IPS_NZ(
"IPS_NZ",
"preset_ips_nz",
IPS_NZ_CONTEXT,
setOf(IPS_NZ_IG),
setOf(ANY_EXTENSION),
setOf(IPS_NZ_BUNDLE_PROFILE)
),
CDA(
"CDA",
"present_cda",
Expand Down

0 comments on commit 0a7e164

Please sign in to comment.