コード例 #1
0
ファイル: createCCR.php プロジェクト: katopenzz/openemr
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);
    }
}
コード例 #2
0
 * LICENSE: This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 3
 * of the License, or (at your option) any later version.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
 *
 * @package OpenEMR
 * @author  Garden State Health Systems <http://www.gshsys.com/>
 * @link    http://www.open-emr.org
 */
$result = getActorData();
while ($row = sqlFetchArray($result[0])) {
    $e_Actor = $ccr->createElement('Actor');
    $e_Actors->appendChild($e_Actor);
    $e_ActorObjectID = $ccr->createElement('ActorObjectID', 'A1234');
    // Refer createCCRHeader.php
    $e_Actor->appendChild($e_ActorObjectID);
    $e_Person = $ccr->createElement('Person');
    $e_Actor->appendChild($e_Person);
    $e_Name = $ccr->createElement('Name');
    $e_Person->appendChild($e_Name);
    $e_CurrentName = $ccr->createElement('CurrentName');
    $e_Name->appendChild($e_CurrentName);
    $e_Given = $ccr->createElement('Given', $row['fname']);
    $e_CurrentName->appendChild($e_Given);
    $e_Family = $ccr->createElement('Family', $row['lname']);