Skip to content

Commit

Permalink
hotfix Organization JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanwilliammd committed Nov 12, 2024
1 parent cabf22c commit 79cac8d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/FHIR/Organization.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 79cac8d

Please sign in to comment.