Skip to content

Commit

Permalink
Added HIPAA choice fields in patient demographic information
Browse files Browse the repository at this point in the history
  • Loading branch information
andres_paglayan committed Apr 6, 2005
1 parent f9ec4c4 commit 4006096
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 5 deletions.
16 changes: 14 additions & 2 deletions interface/patient_file/summary/demographics.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,20 @@
</td>
<td valign=top></td>
</tr>


<tr>
<td colspan=2 valign=top>
<?
$results{"hipaa_mail"}=='NO' ? $opt_out='DOES NOT ALLOW' : $opt_out='ALLOWS' ;
echo "Patient $opt_out Mailed Information";
?>
</td>
<td colspan=2 valign=top>
<?
$results{"hipaa_voice"}=='NO' ? $opt_out='DOES NOT ALLOW' : $opt_out='ALLOWS' ;
echo "Patient $opt_out Voice Messages";
?>
</td>
</tr>
<tr>
<td valign=top>
<? if ($result{"occupation"} != "") {?><span class=bold>Occupation: </span><span class=text><?echo $result{"occupation"}?></span><br><?}?>
Expand Down
33 changes: 33 additions & 0 deletions interface/patient_file/summary/demographics_full.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,39 @@ function checkNum () {
</td>
<td><input name="genericname2" size=20 value="<?echo $result{"genericname2"};?>" /></td><td><input name="genericval2" size=20 value="<?echo $result{"genericval2"};?>" /></td>
</tr>
<tr>
<td colspan=6>
<a href="javascript:document.demographics_form.submit();" target=Main class=link_submit>[Save Patient Demographics]</a>
<hr>
</td>
</tr>
</table>

<table class=bold>
<th>HIPAA Choices:</th>
<tr>
<td>Allow Mail:</td>
<td>
<select name="hipaa_mail">
<?
echo ('<option>NO</option>');
$result{"hipaa_mail"}=='YES' ? $opt_out='<option selected>YES</option>' : $opt_out='<option>YES</option>' ;
echo $opt_out;
?>
</select>
<td>Allow Voice Msg:</td>
<td>
<select name="hipaa_voice">
<?
echo ('<option>NO</option>');
$result{"hipaa_voice"}=='YES' ? $opt_out='<option selected>YES</option>' : $opt_out='<option>YES</option>' ;
echo $opt_out;
?>
</select>
</td>
<td></td>
<td></td>
</tr>
</table>


Expand Down
5 changes: 4 additions & 1 deletion interface/patient_file/summary/demographics_save.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@
$_POST["genericval1"],
$_POST["genericname2"],
$_POST["genericval2"],
$_POST["phone_cell"]
$_POST["phone_cell"],
$_POST["hipaa_mail"],
$_POST["hipaa_voice"]

);

newEmployerData( $pid,
Expand Down
6 changes: 5 additions & 1 deletion library/patient.inc
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,9 @@ function newPatientData( $db_id="",
$genericval1 = "",
$genericname2 = "",
$genericval2 = "",
$phone_cell = ""
$phone_cell = "",
$hipaa_mail = "",
$hipaa_voice = ""
)
{
$DOB = fixDate($DOB);
Expand Down Expand Up @@ -445,6 +447,8 @@ function newPatientData( $db_id="",
genericname2 = '$genericname2',
genericval2 = '$genericval2',
phone_cell = '$phone_cell',
hipaa_mail = '$hipaa_mail',
hipaa_voice = '$hipaa_voice',
date=NOW()
");

Expand Down
6 changes: 5 additions & 1 deletion library/report.inc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ occupation => "Occupation: ",
phone_home => "Home Phone: ",
phone_biz => "Business Phone: ",
phone_contact => "Contact Phone: ",
contact_relationship => "Contact Person");
contact_relationship => "Contact Person",
hipaa_mail => "Allows Mail: ",
hipaa_voice => "Allows Voice msgs: "
);


$history_data_array = array(
coffee => "Coffee Use: ",
Expand Down
3 changes: 3 additions & 0 deletions sql/2_6_5-to-2_7_0_upgrade.sql
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
ALTER TABLE `form_encounter` ADD `onset_date` DATETIME;

ALTER TABLE `patient_data` ADD `hipaa_mail` VARCHAR( 3 ) DEFAULT 'NO' NOT NULL ,
ADD `hipaa_voice` VARCHAR( 3 ) DEFAULT 'NO' NOT NULL ;
2 changes: 2 additions & 0 deletions sql/database.sql
Original file line number Diff line number Diff line change
Expand Up @@ -27293,6 +27293,8 @@ CREATE TABLE `patient_data` (
`genericval1` varchar(255) NOT NULL default '',
`genericname2` varchar(255) NOT NULL default '',
`genericval2` varchar(255) NOT NULL default '',
`hipaa_mail` VARCHAR( 3 ) DEFAULT 'NO' NOT NULL ,
`hipaa_voice` VARCHAR( 3 ) DEFAULT 'NO' NOT NULL
UNIQUE KEY `pid` (`pid`),
KEY `id` (`id`),
KEY `pid_2` (`pid`)
Expand Down

0 comments on commit 4006096

Please sign in to comment.