Skip to content

Commit

Permalink
Merge pull request #62 from ivanwilliammd/hotfix_organization
Browse files Browse the repository at this point in the history
Hotfix organization
  • Loading branch information
ivanwilliammd authored Nov 12, 2024
2 parents e9c57eb + 79cac8d commit e2514cf
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/FHIR/Organization.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,17 @@ public function addAddress($address_line = null, $postal_code = null, $city_name
public function json()
{
// Add Organization type
$this->organization['type'][] = [
'coding' => [
[
'system' => 'http://terminology.hl7.org/CodeSystem/organization-type',
'code' => 'dept',
'display' => 'Hospital Department',
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 e2514cf

Please sign in to comment.