|
@@ -3,6 +3,7 @@
|
|
// info from patient chart
|
|
// info from patient chart
|
|
$drugs = \App\Models\Point::getPointsOfCategory($patient, "MEDICATION");
|
|
$drugs = \App\Models\Point::getPointsOfCategory($patient, "MEDICATION");
|
|
$allergies = \App\Models\Point::getPointsOfCategory($patient, "ALLERGY");
|
|
$allergies = \App\Models\Point::getPointsOfCategory($patient, "ALLERGY");
|
|
|
|
+$problems = \App\Models\Point::getPointsOfCategory($patient, "PROBLEM");
|
|
|
|
|
|
// filter out drugs without fdb info on them
|
|
// filter out drugs without fdb info on them
|
|
$drugs = $drugs->filter(function($_drug) {
|
|
$drugs = $drugs->filter(function($_drug) {
|
|
@@ -22,11 +23,18 @@ $allergies = $allergies->filter(function($_allergy) {
|
|
$_allergy->data->damConceptIdType;
|
|
$_allergy->data->damConceptIdType;
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+// filter out problems without fdb info on them
|
|
|
|
+$problems = $problems->filter(function($_allergy) {
|
|
|
|
+ return @$_allergy->data &&
|
|
|
|
+ $_allergy->data->name &&
|
|
|
|
+ $_allergy->data->dxid;
|
|
|
|
+});
|
|
|
|
+
|
|
// side effects
|
|
// side effects
|
|
$sideeffects = side_effects_info($drugs);
|
|
$sideeffects = side_effects_info($drugs);
|
|
|
|
|
|
// contraindications
|
|
// contraindications
|
|
-$contraindications = contraindications_info($drugs);
|
|
|
|
|
|
+$contraindications = contraindications_info($drugs, $problems);
|
|
|
|
|
|
// dpt
|
|
// dpt
|
|
$dptInfo = duplicate_therapy_info($drugs);
|
|
$dptInfo = duplicate_therapy_info($drugs);
|