Skip to content

Commit

Permalink
Added AMC for ePrescription
Browse files Browse the repository at this point in the history
Signed-off-by: vinish <[email protected]>
  • Loading branch information
vinish authored and bradymiller committed Jul 28, 2011
1 parent 2bf9e22 commit dd1b972
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions interface/soap_functions/soap_patientfullmedication.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
require_once('../globals.php');
require_once('../eRx_xml.php');
require_once('../../library/xmltoarray_parser_htmlfix.php');
require_once($GLOBALS['fileroot'] . "/library/amc.php");
set_time_limit(0);
if(!$patientid)
$patientid=$pid;
Expand Down Expand Up @@ -132,10 +133,10 @@
}

$check=sqlStatement("select * from prescriptions where prescriptionguid=? and patient_id=? and prescriptionguid is not null",array($medArray[$i]['PrescriptionGuid'],$medArray[$i]['ExternalPatientID']));

$prescription_id='';
if(sqlNumRows($check)==0)
{
sqlQuery("insert into prescriptions
$prescription_id=sqlInsert("insert into prescriptions
(
patient_id,provider_id,date_added,drug,drug_id,form,dosage,size,unit,route,`INTERVAL`,refills,note,`DATETIME`,
`USER`,site,prescriptionguid,erx_source,rxnorm_drugcode
Expand All @@ -158,6 +159,10 @@
$medArray[$i]['PrescriptionNotes'],$_SESSION['authUserID'],
$medArray[$i]['SiteID'],$medArray[$i]['rxcui'],$medArray[$i]['PrescriptionGuid'],$medArray[$i]['ExternalPatientID']));
}
$result=sqlFetchArray($check);
if($result['id'])
$prescription_id=$result['id'];
processAmcCall('e_prescribe_amc', true, 'add', $medArray[$i]['ExternalPatientID'], 'prescriptions', $prescription_id);
}
sqlQuery("update patient_data set soap_import_status=? where pid=?",array('2',$pid));
if($xml_response_count==0)
Expand Down

0 comments on commit dd1b972

Please sign in to comment.