diff --git a/src/FHIR/Organization.php b/src/FHIR/Organization.php index 1f5931d..6c44b98 100644 --- a/src/FHIR/Organization.php +++ b/src/FHIR/Organization.php @@ -140,6 +140,18 @@ public function addAddress($address_line = null, $postal_code = null, $city_name public function json() { + // Add Organization type + if (!array_key_exists('type', $this->organization)) { + $this->organization['type'][] = [ + 'coding' => [ + [ + 'system' => 'http://terminology.hl7.org/CodeSystem/organization-type', + 'code' => 'dept', + 'display' => 'Hospital Department', + ], + ], + ]; + } // Identifier is required if (!array_key_exists('identifier', $this->organization)) {