diff --git a/modules/ClinikalAPI/src/ClinikalAPI/Controller/PdfBaseController.php b/modules/ClinikalAPI/src/ClinikalAPI/Controller/PdfBaseController.php index e8b211f..75d45d8 100644 --- a/modules/ClinikalAPI/src/ClinikalAPI/Controller/PdfBaseController.php +++ b/modules/ClinikalAPI/src/ClinikalAPI/Controller/PdfBaseController.php @@ -83,7 +83,13 @@ public function getListsOpenEMRInfo($type=null,$pid,$encounter,$outcome) { if (!is_null($type)) { $info = $this->container->get('GenericTools\Model\ListsOpenEmrTable')->getListWithTheType($type,$pid,$encounter,$outcome); - return $info; + $result = []; + foreach ($info as $item) { + if(!in_array($item, $result)) { + $result[] = $item; + } + } + return $result; } else { return array(); diff --git a/modules/ClinikalAPI/src/ClinikalAPI/Service/IndicatorSettingsService.php b/modules/ClinikalAPI/src/ClinikalAPI/Service/IndicatorSettingsService.php index 5c61472..d60c981 100644 --- a/modules/ClinikalAPI/src/ClinikalAPI/Service/IndicatorSettingsService.php +++ b/modules/ClinikalAPI/src/ClinikalAPI/Service/IndicatorSettingsService.php @@ -40,7 +40,15 @@ public function getIndicatorSettings($indicator) if($val['notes']!=='') { $notes = json_decode($val['notes']); $arrTemp['label'] = $notes->label; - $arrTemp['mask'] = $notes->mask; + if (isset($notes->mask)) { + $arrTemp['mask'] = $notes->mask; + } + if (isset($notes->placeholder)) { + $arrTemp['placeholder'] = $notes->placeholder; + } + if (isset($notes->symbol)) { + $arrTemp['symbol'] = $notes->symbol; + } $indicators['variant'][$key]=$arrTemp; }else{ $arrTemp['label'] = $val['mapping']; @@ -56,7 +64,15 @@ public function getIndicatorSettings($indicator) if($val['notes']!=='') { $notes = json_decode($val['notes']); $arrTemp['label'] = $notes->label; - $arrTemp['mask'] = $notes->mask; + if (isset($notes->mask)) { + $arrTemp['mask'] = $notes->mask; + } + if (isset($notes->placeholder)) { + $arrTemp['placeholder'] = $notes->placeholder; + } + if (isset($notes->symbol)) { + $arrTemp['symbol'] = $notes->symbol; + } $indicators['constant'][$key]=$arrTemp; }else{ $arrTemp['label'] = $val['mapping']; diff --git a/modules/FhirAPI/sql/1_0_0-to-2_0_0_upgrade.sql b/modules/FhirAPI/sql/1_0_0-to-2_0_0_upgrade.sql index 129ff69..4bf62eb 100644 --- a/modules/FhirAPI/sql/1_0_0-to-2_0_0_upgrade.sql +++ b/modules/FhirAPI/sql/1_0_0-to-2_0_0_upgrade.sql @@ -91,21 +91,21 @@ -- behavior: can take a long time. REPLACE INTO `list_options` (`list_id`, `option_id`, `title`, `seq`,`mapping` ,`notes`, `activity`,`subtype`) VALUES -('loinc_org', '8480-6', 'Systolic blood pressure', 10,'bps','{"mask": "___","label":"Blood pressure"}', 1,'mmHg'), -('loinc_org', '8462-4', 'Diastolic blood pressure', 20,'bpd','{"mask": "___","label":"Blood pressure"}', 1,'mmHg'), -('loinc_org', '8308-9', 'Body height --standing', 30,'height','{"label": "Height","mask":"___"}', 1,'cm'), -('loinc_org', '8335-2', 'Body weight Estimated', 40,'weight','{"label": "Weight","mask":"___._"}', 1,'Kg'), -('loinc_org', '69000-8','Heart rate --sitting', 50,'pulse','{"label": "Pulse","mask": "___"}', 1,'PRA'), -('loinc_org', '8310-5', 'Body temperature', 60,'temperature','{"label": "Fever","mask": "__._"}', 1,'C'), +('loinc_org', '8480-6', 'Systolic blood pressure', 10,'bps','{"placeholder": "___" ,"label":"Blood pressure"}', 1,'mmHg'), +('loinc_org', '8462-4', 'Diastolic blood pressure', 20,'bpd','{"placeholder": "___","label":"Blood pressure"}', 1,'mmHg'), +('loinc_org', '8308-9', 'Body height --standing', 30,'height','{"label": "Height","placeholder":"___"}', 1,'cm'), +('loinc_org', '8335-2', 'Body weight Estimated', 40,'weight','{"label": "Weight","placeholder":"___._"}', 1,'Kg'), +('loinc_org', '69000-8','Heart rate --sitting', 50,'pulse','{"label": "Pulse","placeholder": "___"}', 1,'PRA'), +('loinc_org', '8310-5', 'Body temperature', 60,'temperature','{"label": "Fever","placeholder": "__._","mask": "##.#"}', 1,'C'), ('loinc_org', '8327-9', 'Body temperature measurement site', 70,'temp_method','', 1,''), -('loinc_org', '20564-1', 'Oxygen saturation in Blood', 80,'oxygen_saturation','{"label": "Saturation","mask": "___%"}', 1,'%'), +('loinc_org', '20564-1', 'Oxygen saturation in Blood', 80,'oxygen_saturation','{"label": "Saturation","placeholder": "___", "symbol": "%"}', 1,'%'), ('loinc_org', '39156-5', 'Body mass index (BMI) [Ratio]', 90,'BMI','', 1,'kg/m2'), ('loinc_org', '59574-4', 'Body mass index (BMI) [Percentile]', 100,'BMI_status','', 1,''), ('loinc_org', '8280-0', 'Waist Circumference at umbilicus by Tape measure', 110,'waist_circ','', 1,'cm'), ('loinc_org', '8287-5', 'Head Occipital-frontal circumference by Tape measure', 120,'head_circ','', 1,'cm'), -('loinc_org', '9303-9', 'Respiratory rate --resting', 130,'respiration','{"label": "Breaths per minute","mask": "__"}', 1,'BPM'), -('loinc_org', '72514-3', 'Pain severity - 0-10 verbal numeric rating [Score] - Reported', 140,'pain_severity','{"label": "Pain level","mask": "__"}', 1,''), -('loinc_org', '74774-1', 'Glucose [Mass/volume] in Serum, Plasma or Blood', 150,'glucose','{"label": "Blood sugar","mask": "___"}', 1,'mg/dL'); +('loinc_org', '9303-9', 'Respiratory rate --resting', 130,'respiration','{"label": "Breaths per minute","placeholder": "__"}', 1,'BPM'), +('loinc_org', '72514-3', 'Pain severity - 0-10 verbal numeric rating [Score] - Reported', 140,'pain_severity','{"label": "Pain level","placeholder": "__"}', 1,''), +('loinc_org', '74774-1', 'Glucose [Mass/volume] in Serum, Plasma or Blood', 150,'glucose','{"label": "Blood sugar","placeholder": "___"}', 1,'mg/dL'); #IfMissingColumn fhir_value_sets language ALTER TABLE fhir_value_sets ADD `language` VARCHAR(3) NOT NULL DEFAULT 'en';