Reference · FHIR R4 · Resource dan datatype

Anatomi resource JSON + datatype

Ringkasan satu halaman. Dari Lesson FHIR 0004–0007. Versi: FHIR R4 (4.0.1).

Kerangka setiap resource [1] [11]

{
  "resourceType": "Observation",     // tipe (JSON)
  "id": "f001",                      // logical id (Resource)
  "meta": { "versionId": "3", "lastUpdated": "…", "profile": ["…"] },   // (Resource), diisi server
  "text": { "status": "generated", "div": "<div …>" },               // narrative (DomainResource)
  "contained": [ … ],                // resource tanpa identitas sendiri, dirujuk "#id"
  "extension": [ { "url": "…", "valueX": … } ],
  "modifierExtension": [ … ],        // tidak boleh diabaikan
  …elemen khas resource…
}

Aturan JSON [7] [6]

AturanAkibat di TS
Tidak ada null, objek/array/string tidak pernah kosong: property dihilangkanpakai ?:, cek === undefined
Kardinalitas maks > 1 → selalu array, walau isi satu; nama tetap tunggalname?: HumanName[]
Urutan property bebas; urutan isi array dipertahankanjangan anggap resourceType di depan
Extension/id pada primitif → property _namabirthDate + _birthDate.extension
decimal: JSON.parse membuang presisi (2.00 → 2)lesson 0004

Cardinality: 0..1 opsional · 1..1 wajib · 0..* array opsional · 1..* array minimal satu. Flag: ?! modifier (mengubah makna, mis. status, active), Σ summary.

id vs identifier [1] [2]

ididentifier
Nama resmilogical idbusiness identifier (tipe Identifier)
Penetapserver penyimpansistem dunia nyata (RS, negara, lab)
Bentukstring ≤ 64, [A-Za-z0-9-.], opaque{ use, type, system, value, period, assigner }, 0..*
Unik ditipe resource × serverdalam system
Antar serverbisa berbedasama → entitas yang sama
Padanansurrogate primary keynatural key (No. RM, NIK)

Reference [3]

{ "reference": "Patient/f001", "display": "P. van de Heuvel" }          // literal relatif + teks UI
{ "reference": "http://example.org/fhir/Patient/f001" }                 // literal absolut
{ "reference": "Observation/1x2/_history/2" }                           // versi tertentu
{ "reference": "#p1" }                                                  // ke contained
{ "identifier": { "system": "http://hl7.org/fhir/sid/us-ssn", "value": "000111111" } }  // logical

Coding vs CodeableConcept [2] [4]

type Coding = { system?: string; version?: string; code?: string; display?: string; userSelected?: boolean };
type CodeableConcept = { coding?: Coding[]; text?: string };

"code": { "coding": [
  { "system": "http://loinc.org",       "code": "29463-7",  "display": "Body Weight" },
  { "system": "http://snomed.info/sct", "code": "27113001", "display": "Body weight" },
  { "system": "http://acme.org/devices/clinical-codes", "code": "body-weight" } ] }

Terminologi

SistemsystemUntuk
LOINC [12]http://loinc.orgapa yang diukur: Observation.code (mis. 15074-8 glukosa)
SNOMED CT [13]http://snomed.info/sctkonsep klinis: temuan, prosedur, alasan, nilai berkode
ICD-10 [14] [15]http://hl7.org/fhir/sid/icd-10klasifikasi diagnosis: statistik, pelaporan, klaim; kode bertitik (J21.8)
UCUM [2]http://unitsofmeasure.orgsatuan Quantity (mmol/L, [lb_av])

Choice type [x] [6]

Tiga resource inti

ResourceElemen yang dibaca dulu
Patient [8]identifier 0..*, active ?!, name 0..* (HumanName), gender, birthDate, deceased[x], address, managingOrganization
Encounter [9]status 1..1, class Coding 1..1 (AMB, IMP, EMER…), type, subject, participant, period, reasonCode, diagnosis, serviceProvider
Observation [10]status 1..1 ?!, category, code 1..1, subject, encounter, effective[x], issued, performer, value[x], interpretation, referenceRange, component

meta · contained · extension [1] [3] [5]

Jawaban 60–90 detik

Observation = satu pengukuran: status, code (apa), subject (siapa, Reference relatif Patient/…), effective[x] (kapan), value[x] (hasil, mis. valueQuantity dengan UCUM). code adalah CodeableConcept: daftar Coding (system + code + display) plus text. Beberapa Coding = konsep sama di beberapa code system (lokal, LOINC, SNOMED CT), urutan tak bermakna, jadi cari berdasarkan system. id = logical id dari server (URL); identifier = business identifier (system + value) untuk mencocokkan antar sistem.

Sumber: [1] Resource · [2] Data Types · [3] References · [4] Using Codes · [5] Extensibility · [6] Formats · [7] JSON · [8] Patient · [9] Encounter · [10] Observation · [11] DomainResource · [12] LOINC · [13] SNOMED CT · [14] ICD · [15] WHO ICD · [20] Encounter R5