Refactor Bangladesh Address Code Systems and Profiles

- Deleted the bdAddressCS code system file as it was no longer needed.
- Updated the division extension to accept string values instead of CodeableConcept.
- Created a new extension for Upazillas to standardize their representation in addresses.
- Modified the patient profile to include address constraints specific to Bangladesh, including the new Upazilla extension and district value set.
- Renamed the bdAddress profile to BDAddress for consistency and clarity.
This commit is contained in:
Fahim Hossain 2025-09-27 16:25:48 +06:00
parent 592c657c16
commit 842e191b54
7 changed files with 1678 additions and 132 deletions

View File

@ -1,68 +0,0 @@
// @Name: Profile
// @Description: Example of a profile of the Patient resource. This example includes a few of the most commonly used constraints and documentation features of FHIR profiles.
Profile: PatientProfile
Id: patient-profile
Parent: Patient
Title: "Patient Profile for Bangladesh"
Description: "Profile of Patient Bangladesh Standard"
// ----- Begin rules:
// Require at least one value inside the name element
* name 1..* MS
* name ^slicing.discriminator.type = #value
* name ^slicing.discriminator.path = "use"
* name ^slicing.rules = #open
* name contains
EN 1..1 and
BN 1..1
* name[EN].use = #official
* name[BN].use = #usual
* identifier 1..* MS
* identifier ^slicing.discriminator.type = #value
* identifier ^slicing.discriminator.path = "system"
* identifier ^slicing.rules = #open
* identifier ^slicing.ordered = false
* identifier ^slicing.description = "Slice based on the type of identifier."
* identifier contains
NID 0..1 and
BRN 0..1 and
UID 0..1
* identifier[NID].system = "http://dghs.gov.bd/identifier/nid"
* identifier[NID].type.coding.code = #NID
* identifier[NID].type.coding.system = "http://terminology.hl7.org/CodeSystem/v2-0203"
* identifier[NID].type.text = "Organization identifier"
* identifier[BRN].system = "http://dghs.gov.bd/identifier/brn"
* identifier[BRN].type.coding.code = #BRN
* identifier[BRN].type.coding.system = "http://terminology.hl7.org/CodeSystem/v2-0203"
* identifier[BRN].type.text = "Organization identifier"
* identifier[UID].system = "http://dghs.gov.bd/identifier/uid"
* identifier[UID].type.coding.code = #UID
* identifier[UID].type.coding.system = "http://terminology.hl7.org/CodeSystem/v2-0203"
* identifier[UID].type.text = "Organization identifier"
// Mark elements as MustSupport
// * name and name.given and name.family MS
// * name ^short = "dak nam"
// * name ^definition = "Official name (i.e., legal name) of the patient, corresponding to official in [this value set](https://www.hl7.org/fhir/valueset-name-use.html)."
// The contents of ^comment are also displayed on the "Detailed Descriptions" tab
// in the built Implementation Guide.
* birthDate ^comment = "If exact date of birth is partially or completely unknown, Implementers SHALL populate this element with the date of birth information listed on the patient's government-issued identification."
// Do not allow gender to be included.
* gender 1..1
// Require a value from a specific value set be used for an element
* maritalStatus from http://hl7.org/fhir/ValueSet/marital-status
// Restrict something[x] to a specific type -- in this case only allowing dateTime to be used
* deceased[x] only dateTime

File diff suppressed because it is too large Load Diff

View File

@ -1,58 +0,0 @@
CodeSystem: BDAddressCS
Id: bd-address-cs
Title: "Bangladesh Address Codes"
Description: "Bangladesh Address Codes"
* ^url = "https://fhir.dghs.gov.bd/core/CodeSystem/bd-divisions"
* #30 "Dhaka"
* #20 "Chattogram"
* #50 "Rajshahi"
* #55 "Rangpur"
* #40 "Khulna"
* #10 "Barishal"
* #60 "Sylhet"
* #45 "Mymensingh"
* #3026 "Dhaka"
ValueSet: BDDivisionsVS
Id: bd-division-code-vs
Title: "Bangladesh Division ValueSet"
Description: "Bangladesh Division Codes (only two-digit codes)"
* ^url = "https://fhir.dghs.gov.bd/core/ValueSet/bd-divisions"
// include only codes that are exactly 2 digits
* include codes from system https://fhir.dghs.gov.bd/core/CodeSystem/bd-divisions
where code regex "^[0-9]{2}$"
ValueSet: BDDistrictVS
Id: bd-district-code-vs
Title: "Bangladesh district ValueSet"
Description: "Bangladesh district Codes (only two-digit codes)"
* ^url = "https://fhir.dghs.gov.bd/core/ValueSet/bd-districts"
// include only codes that are exactly 2 digits
* include codes from system https://fhir.dghs.gov.bd/core/CodeSystem/bd-districts
where code regex "^[0-9]{4}$"
ValueSet: BDCityCorporationVS
Id: bd-city-corporations-code-vs
Title: "Bangladesh district ValueSet"
Description: "Bangladesh district Codes (only two-digit codes)"
* ^url = "https://fhir.dghs.gov.bd/core/ValueSet/bd-city-corporations"
// include only codes that are exactly 2 digits
* include codes from system https://fhir.dghs.gov.bd/core/CodeSystem/bd-city-corporations
where code regex "^[0-9]{6}$"
ValueSet: BDUpazillaVS
Id: bd-upazilla-code-vs
Title: "Bangladesh district ValueSet"
Description: "Bangladesh district Codes (only two-digit codes)"
* ^url = "https://fhir.dghs.gov.bd/core/ValueSet/bd-upazilla"
// include only codes that are exactly 2 digits
* include codes from system https://fhir.dghs.gov.bd/core/CodeSystem/bd-upazilla
where code regex "^[0-9]{8}$"

View File

@ -6,5 +6,5 @@ Description: "BD Division"
Context: Address Context: Address
* value[x] only CodeableConcept * value[x] only string
* valueCodeableConcept from BDDivisionsVS * value[x] from BDDivisionsVS

View File

@ -0,0 +1,10 @@
Extension: Upazillas
Id: bd-upazillas
Title: "Upazilla"
Description: "BD Upazilla"
Context: Address
* value[x] only string
* value[x] from BDUpazillasVS

View File

@ -101,4 +101,7 @@ Description: "Profile of Patient Bangladesh Standard"
* extension contains http://hl7.org/fhir/StructureDefinition/patient-religion named religion 0..1 * extension contains http://hl7.org/fhir/StructureDefinition/patient-religion named religion 0..1
* extension[religion] ^short = "ধর্ম (Religion)" * extension[religion] ^short = "ধর্ম (Religion)"
* extension[religion] ^definition = "The patient's religious affiliation." * extension[religion] ^definition = "The patient's religious affiliation."
* extension[religion].valueCodeableConcept from http://hl7.org/fhir/ValueSet/religious-affiliation * extension[religion].valueCodeableConcept from http://hl7.org/fhir/ValueSet/religious-affiliation
* address 1..* MS
* address only BDAddress

View File

@ -1,7 +1,7 @@
// @Name: Profile // @Name: Profile
// @Description: Example of a profile of the Patient resource. This example includes a few of the most commonly used constraints and documentation features of FHIR profiles. // @Description: Example of a profile of the Address resource for Bangladesh.
Profile: bdAddress Profile: BDAddress
Id: bd-address Id: bd-address
Parent: Address Parent: Address
Title: "Address for Bangladesh" Title: "Address for Bangladesh"
@ -9,4 +9,9 @@ Description: "Address for Bangladesh Standard"
* country 1..1 MS * country 1..1 MS
* extension contains Division named division 1..1 MS * extension contains Division named division 1..1 MS
* district 1..1 MS
* district from BDDistrictsVS
* extension contains Upazillas named upazilla 1..1 MS