-
Notifications
You must be signed in to change notification settings - Fork 0
TW Core Conformance
Siming supports TW Core IG v1.0.0 — Taiwan's MOHW FHIR Implementation Guide.
Validated using the HL7 FHIR Validator service (inferno-resource-validator:1.0.78) against TW Core v1.0.0 StructureDefinitions.
| Profile | Result | Notes |
|---|---|---|
| Patient-twcore | ✅ PASS | |
| Condition-twcore | ✅ PASS | |
| Encounter-twcore | ✅ PASS | |
| MedicationRequest-twcore | ✅ PASS | NHI CodeSystem not publicly resolvable (expected) |
| AllergyIntolerance-twcore | ✅ PASS | |
| Observation-laboratoryResult-twcore | ✅ PASS | |
| Practitioner-twcore | ✅ PASS | |
| Organization-twcore | ✅ PASS | |
| DiagnosticReport-twcore | ✅ PASS |
All results: zero ERRORs. Warnings are FHIR best-practice advisories (dom-6 narrative), not TW Core requirements.
Full report: docs/tw-core-conformance.md
POST /{ResourceType}/$validate validates a resource without storing it. Returns an OperationOutcome.
Checks required binding codes against local ValueSet index. No external service needed.
curl -X POST http://localhost:8080/Patient/$validate \
-H "Content-Type: application/fhir+json" \
-d '{"resourceType":"Patient","gender":"invalid-code"}'Pass ?profile= to validate against a specific TW Core StructureDefinition.
curl -X POST "http://localhost:8080/Patient/\$validate?profile=https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Patient-twcore" \
-H "Content-Type: application/fhir+json" \
-d '{
"resourceType": "Patient",
"identifier": [{"system": "http://www.boma.mohw.gov.tw", "value": "A123456789"}],
"gender": "male",
"birthDate": "1990-01-01"
}'- Uncomment the
validatorservice indocker-compose.yml - Add to
.env:VALIDATOR_URL=http://validator:4567 - Restart:
docker compose up -d
First validation loads TW Core IG (~10s). Subsequent calls reuse the session (~13ms).
Fields required by TW Core StructureDefinitions (missing → ERROR in $validate):
| Profile | Required beyond FHIR R4 base |
|---|---|
| Patient |
identifier (min=1), gender (min=1), birthDate (min=1) |
| Condition |
clinicalStatus (min=1), category (min=1), subject (min=1) |
| Encounter |
status (min=1), class (min=1) |
| MedicationRequest |
status, intent, medication[x], subject (all min=1) |
| AllergyIntolerance |
code (min=1), patient (min=1) |
| Observation (lab) |
status, category, code, subject (all min=1) |
| Practitioner | (no additional required fields) |
| Organization | (no additional required fields) |
| DiagnosticReport |
status, code, subject (all min=1) |
| Resource | Profile URL |
|---|---|
| Patient | https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Patient-twcore |
| Condition | https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Condition-twcore |
| Encounter | https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Encounter-twcore |
| MedicationRequest | https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/MedicationRequest-twcore |
| AllergyIntolerance | https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/AllergyIntolerance-twcore |
| Observation (lab) | https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Observation-laboratoryResult-twcore |
| Practitioner | https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Practitioner-twcore |
| Organization | https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/Organization-twcore |
| DiagnosticReport | https://twcore.mohw.gov.tw/ig/twcore/StructureDefinition/DiagnosticReport-twcore |