예제 #1
0
function createCCR($action, $raw = "no")
{
    $authorID = getUuid();
    echo '<!--';
    $ccr = new DOMDocument('1.0', 'UTF-8');
    $e_styleSheet = $ccr->createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="ccr.xsl"');
    $ccr->appendChild($e_styleSheet);
    $e_ccr = $ccr->createElementNS('urn:astm-org:CCR', 'ContinuityOfCareRecord');
    $ccr->appendChild($e_ccr);
    /////////////// Header
    require_once "createCCRHeader.php";
    $e_Body = $ccr->createElement('Body');
    $e_ccr->appendChild($e_Body);
    /////////////// Problems
    $e_Problems = $ccr->createElement('Problems');
    require_once "createCCRProblem.php";
    $e_Body->appendChild($e_Problems);
    /////////////// Alerts
    $e_Alerts = $ccr->createElement('Alerts');
    require_once "createCCRAlerts.php";
    $e_Body->appendChild($e_Alerts);
    ////////////////// Medication
    $e_Medications = $ccr->createElement('Medications');
    require_once "createCCRMedication.php";
    $e_Body->appendChild($e_Medications);
    ///////////////// Immunization
    $e_Immunizations = $ccr->createElement('Immunizations');
    require_once "createCCRImmunization.php";
    $e_Body->appendChild($e_Immunizations);
    /////////////////// Results
    $e_Results = $ccr->createElement('Results');
    require_once "createCCRResult.php";
    $e_Body->appendChild($e_Results);
    /////////////////// Procedures
    $e_Procedures = $ccr->createElement('Procedures');
    require_once "createCCRProcedure.php";
    $e_Body->appendChild($e_Procedures);
    //////////////////// Footer
    // $e_VitalSigns = $ccr->createElement('VitalSigns');
    // $e_Body->appendChild($e_VitalSigns);
    /////////////// Actors
    $e_Actors = $ccr->createElement('Actors');
    require_once "createCCRActor.php";
    $e_ccr->appendChild($e_Actors);
    // save created CCR in file
    echo " \n action=" . $action;
    if ($action == "generate") {
        gnrtCCR($ccr, $raw);
    }
    if ($action == "viewccd") {
        viewCCD($ccr, $raw);
    }
}
예제 #2
0
function createCCR($action, $raw = "no", $requested_by = "")
{
    $authorID = getUuid();
    $patientID = getUuid();
    $sourceID = getUuid();
    $oemrID = getUuid();
    $result = getActorData();
    while ($res = sqlFetchArray($result[2])) {
        ${"labID{$res['id']}"} = getUuid();
    }
    $ccr = new DOMDocument('1.0', 'UTF-8');
    $e_styleSheet = $ccr->createProcessingInstruction('xml-stylesheet', 'type="text/xsl" href="stylesheet/ccr.xsl"');
    $ccr->appendChild($e_styleSheet);
    $e_ccr = $ccr->createElementNS('urn:astm-org:CCR', 'ContinuityOfCareRecord');
    $ccr->appendChild($e_ccr);
    /////////////// Header
    require_once "createCCRHeader.php";
    $e_Body = $ccr->createElement('Body');
    $e_ccr->appendChild($e_Body);
    /////////////// Problems
    $e_Problems = $ccr->createElement('Problems');
    require_once "createCCRProblem.php";
    $e_Body->appendChild($e_Problems);
    /////////////// Alerts
    $e_Alerts = $ccr->createElement('Alerts');
    require_once "createCCRAlerts.php";
    $e_Body->appendChild($e_Alerts);
    ////////////////// Medication
    $e_Medications = $ccr->createElement('Medications');
    require_once "createCCRMedication.php";
    $e_Body->appendChild($e_Medications);
    ///////////////// Immunization
    $e_Immunizations = $ccr->createElement('Immunizations');
    require_once "createCCRImmunization.php";
    $e_Body->appendChild($e_Immunizations);
    /////////////////// Results
    $e_Results = $ccr->createElement('Results');
    require_once "createCCRResult.php";
    $e_Body->appendChild($e_Results);
    /////////////////// Procedures
    //$e_Procedures = $ccr->createElement('Procedures');
    //require_once("createCCRProcedure.php");
    //$e_Body->appendChild($e_Procedures);
    //////////////////// Footer
    // $e_VitalSigns = $ccr->createElement('VitalSigns');
    // $e_Body->appendChild($e_VitalSigns);
    /////////////// Actors
    $e_Actors = $ccr->createElement('Actors');
    require_once "createCCRActor.php";
    $e_ccr->appendChild($e_Actors);
    if ($action == "generate") {
        gnrtCCR($ccr, $raw, $requested_by);
    }
    if ($action == "viewccd") {
        viewCCD($ccr, $raw, $requested_by);
    }
}