Highway to PSR2
[openemr.git] / interface / forms / ros / report.php
blob3f2c91a9b72183ea41c98ab02314765fe022a36c
1 <?php
2 //------------Forms generated from formsWiz
3 include_once(dirname(__FILE__).'/../../globals.php');
4 include_once($GLOBALS["srcdir"]."/api.inc");
6 function ros_report($pid, $encounter, $cols, $id)
9 $count = 0;
11 $data = formFetch("form_ros", $id);
13 if ($data) {
14 $cmap = array(
15 "id" => '',
16 "pid" => '',
17 "user" => '',
18 "groupname" => '',
19 "activity" => '',
20 "authorized" => '',
21 "date" => '',
23 // This maps a label to custom text. For example "glaucoma_history" should be
24 // displayed as "Glaucoma Family History". If this wasn't specified, the code
25 // will display it as "Glaucoma History" due to some clever string manipulation.
26 // Acronyms are handled in this map as well.
27 "glaucoma_history" => "Glaucoma Family History",
28 "irritation" => "Eye Irritation",
29 "redness" => "Eye Redness",
30 "discharge" => "ENT Discharge",
31 "pain" => "ENT Pain",
32 "biopsy" => "Breast Biopsy",
33 "hemoptsyis" => "Hemoptysis",
34 "copd" => "COPD",
35 "pnd" => "PND",
36 "doe" => "DOE",
37 "peripheal" => "Peripheral",
38 "legpain_cramping" => "Leg Pain/Cramping",
39 "frequency" => "Urine Frequency",
40 "urgency" => "Urine Urgency",
41 "utis" => "UTIs",
42 "hesitancy" => "Urine Hesitancy",
43 "dribbling" => "Urine Dribbling",
44 "stream" => "Urine Stream",
45 "g" => "Female G",
46 "p" => "Female P",
47 "lc" => "Female LC",
48 "ap" => "Female AP",
49 "mearche" => "Menarche",
50 "lmp" => "LMP",
51 "f_frequency" => "Menstrual Frequency",
52 "f_flow" => "Menstrual Flow",
53 "f_symptoms" => "Female Symptoms",
54 "f_hirsutism" => "Hirsutism/Striae",
55 "swelling" => "Musc Swelling",
56 "m_redness" => "Musc Redness",
57 "m_warm" => "Musc Warm",
58 "m_stiffness" => "Musc Stiffness",
59 "m_aches" => "Musc Aches",
60 "fms" => "FMS",
61 "loc" => "LOC",
62 "tia" => "TIA",
63 "n_numbness" => "Neuro Numbness",
64 "n_weakness" => "Neuro Weakness",
65 "n_headache" => "Headache",
66 "s_cancer" => "Skin Cancer",
67 "s_acne" => "Acne",
68 "s_other" => "Skin Other",
69 "s_disease" => "Skin Disease",
70 "p_diagnosis" => "Psych Diagnosis",
71 "p_medication" => "Psych Medication",
72 "abnormal_blood" => "Endo Abnormal Blood",
73 "fh_blood_problems" => "FH Blood Problems",
74 "hiv" => "HIV",
75 "hai_status" => "HAI Status",
78 print "<div id='form_ros_values'><table class='report_results'><tr>";
80 foreach ($data as $key => $value) {
81 if (isset($cmap[$key])) {
82 if ($cmap[$key] == '') {
83 continue;
86 $key = $cmap[$key];
87 } else {
88 $key = ucwords(str_replace("_", " ", $key));
91 // skip the N/A values -- cfapress, Jan 2009 OR blank or zero date values
92 if ($value == "N/A" || $value == "" ||
93 $value == "0000-00-00" || $value == "0000-00-00 00:00:00") {
94 continue;
97 if ($value == "on") {
98 $value = "yes";
101 printf("<td><span class=bold>%s: </span><span class=text>%s</span></td>", xl($key), xl($value));
102 $count++;
104 if ($count == $cols) {
105 $count = 0;
106 print "</tr><tr>\n";
111 print "</tr></table></div>";