A
download class.OMBS_Wrapper.php
Language: PHP
LOC: 45
Project Info
FreeMED Project(freemed)
Server: SourceForge
Type: cvs
...reemed\freemed\freemed\lib\
   acl.php
   API.php
   bcadd.php
   calendar-functions.php
   class.AdminModule.php
   class.Agata.php
   class.Authorizations.php
   class.BaseModule.php
   class.BillingModule.php
   class.CalendarModule.php
   class.ClaimLog.php
   class.Coverage.php
   class.Debug.php
   class.diagnosis_set.php
   class.Djvu.php
   class.EMRModule.php
   class.Fax.php
   class.FixedFormEntry.php
   ...s.FixedFormRenderer.php
   class.FormRenderer.php
   class.FreeMEDSelfTest.php
   class.GeneralConfig.php
   class.GraphModule.php
   class.Guarantor.php
   class.Handler_HL7v2.php
   ...s.Handler_HL7v2_A04.php
   ...s.Handler_HL7v2_A08.php
   ...s.Handler_HL7v2_S12.php
   ...s.Handler_HL7v2_S15.php
   class.InsuranceCompany.php
   class.LanguageRegistry.php
   class.Ledger.php
   ...s.MaintenanceModule.php
   class.Messages.php
   class.OMBS_Patient.php
   class.OMBS_Wrapper.php
   class.Parser_HL7v2.php
   class.Patient.php
   class.Payer.php
   class.PHPlot.php
   class.Physician.php
   class.Procedure.php
   class.RecordLock.php
   class.Remitt.php
   class.ReportsModule.php
   class.rxlist.php
   class.Scheduler.php
   class.TeX.php
   class.User.php
   class.UtilityModule.php
   class.vCalendar.php
   class.vCalendarEvent.php
   error_handler.php
   freemed.php
   i18n.php
   iso-set.php
   macros.php
   mail-functions.php
   settings.php
   settings.php.tmpl
   xml.php
   xmlrpc_services.php

<?php
	// $Id: class.OMBS_Wrapper.php,v 1.1 2003/08/15 07:08:10 rufustfirefly Exp $
	// $Author: rufustfirefly $
	// Support for the Open Medical Billing System

class OMBS_Wrapper {

	function OMBS_Wrapper ( ) {
		// At this point, do nothing
	} // end constructor OMBS_Wrapper

	function generate ( $_patients ) {
		// If patients isn't an array, make it one
		if (!is_array($_patients)) {
			$patients = array ($_patients);
		} else {
			$patients = $_patients;
		}

		// Generate header
		$buffer = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n".
			"<!DOCTYPE OMBS SYSTEM \"http://66.152.215.155/".
				"pub/ombs.dtd\">\n".
			"<!-- Generated by ".PACKAGENAME." v".VERSION." -->\n".
			"<OMBS generated=\"".PACKAGENAME." ".VERSION."\" ".
				"version=\"1.0\">\n";

		// Loop through all patients
		foreach ($patients as $__garbage => $patient) {
			$this_patient = CreateObject('_FreeMED.OMBS_Patient', $patient);
			$buffer .= $this_patient->generate();
			unset($this_patient);
		}

		// Add footer
		$buffer .= "\n</OMBS>\n";

		// Return formed XML
		return $buffer;
	} // end method generate

	function insurance_billing_patients ($facility = 0) {
		$query = "SELECT DISTINCT procpatient AS patient ".
			"FROM procrec ".
				// Must have actual balance to send
			"WHERE procbalcurrent > '0' ".
				// Has to be an insurance billable item
			"AND procbillable = '0' ".
				// Subdivide by POS, if we have that
			( $facility > 0 ?
				"AND procpos = '".addslashes($facility)."'" :
				'' );
		$result = $GLOBALS['sql']->query($query);
		if ($GLOBALS['sql']->results($result)) {
			$return = array ();
			while ($r = $GLOBALS['sql']->fetch_array($result)) {
				$return[] = $r['patient'];
			}
			return $return;
		} else {
			return array ();
		}
	} // end method insurance_billing_patients

} // end class OMBS_Wrapper

?>

About Koders | Resources | Downloads | Support | Black Duck | Terms of Service | DMCA | Privacy Policy | Contact Us