diff --git a/src/FHIR/Medication.php b/src/FHIR/Medication.php new file mode 100644 index 0000000..1e36c71 --- /dev/null +++ b/src/FHIR/Medication.php @@ -0,0 +1,52 @@ + 'Medication', + ]; + + public function addIdentifier($identifier) + { + $identifier['system'] = 'http://sys-ids.kemkes.go.id/medication/'.$this->organization_id; + $identifier['value'] = $identifier; + $identifier['use'] = 'official'; + + $this->medication['identifier'][] = $identifier; + } + + public function setCode($code = null, $display = null) + { + $coding['system'] = 'http://sys-ids.kemkes.go.id/kfa'; + $coding['code'] = $code; + + if ($display) { + $coding['display'] = $display; + } + + $this->medication['code']['coding'][] = $coding; + } + + public function setStatus($status = 'active') + { + $this->medication['status'] = $status; + } + + public function setManufacturer($manufacturer = null) + { + $this->medication['manufacturer']['reference'] = 'Organization/'.($manufacturer ? $manufacturer : $this->organization_id); + } + + public function setForm($form = null) + { + $this->medication['form']['coding'][] = [ + 'system' => 'http://terminology.hl7.org/CodeSystem/medication-form-codes', + 'code' => $form, + ]; + } +}