Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changes in the indicator settings #64

Merged
merged 1 commit into from
Mar 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand All @@ -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'];
Expand Down
20 changes: 10 additions & 10 deletions modules/FhirAPI/sql/1_0_0-to-2_0_0_upgrade.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down