Пример #1
0
 * the patient’s health status. All pertinent equipment relevant to the diagnosis, care, and treatment of a patient
 * should be included.
 */
$medicalEquipment = array('Equipment' => array(array('CCRDocumentObjectID' => UUID::v4(), 'DateTime' => array('ExactDateTime' => '1998'), 'Source' => array('Actor' => array('ActorID' => $softwareGUID)), 'Product' => array('ProductName' => array('Text' => 'Total hip replacement prosthesis', 'Code' => array('Value' => '304120007', 'CodingSystem' => 'SNOMED CT')), 'Manufacturer' => array('ActorID' => $manufacturerGUID), 'IDs' => array('ID' => UUID::v4(), 'Source' => array('Actor' => array('ActorID' => $softwareGUID)))))));
/**
 * Medications section - (SHALL)
 * -------------------
 * The Medications section defines a patient’s current medications and pertinent medication history. At a
 * minimum, the currently active medications should be listed, with an entire medication history as an option,
 * particularly when the summary document is used for comprehensive data export. The section may also
 * include a patient’s prescription history, and enables the determination of the source of a medication list
 * (e.g. from a pharmacy system vs. from the patient).
 */
$param = new stdClass();
$param->pid = $pid;
$patientMedications = $Medical->getPatientMedications($param);
$medications = array();
foreach ($patientMedications as $item) {
    $medications[] = array('Medication' => array(array('CCRDocumentObjectID' => UUID::v4(), 'DateTime' => array('DateTimeRange' => array('BeginRange' => array('ExactDateTime' => date("Y-m-d", strtotime($item['begin_date']))), 'EndRange' => array('ExactDateTime' => date("Y-m-d", strtotime($item['end_date']))))), 'Status' => array('Text' => 'Active'), 'Source' => array('Actor' => array('ActorID' => $softwareGUID)), 'Product' => array('ProductName' => array('Text' => $item['STR'], 'Code' => array('Value' => $item['RXCUI'], 'CodingSystem' => 'RxNorm')), 'Form' => array('Text' => $item['form'])), 'Directions' => array('Direction' => array(array('Dose' => array('Value' => $item['dose']), 'Route' => array('Code' => array('Value' => $item['route'], 'CodingSystem' => 'RouteOfAdministration')), 'Frequency' => array('Value' => $item['prescription_often'])))))));
}
/**
 * Alerts section - (SHALL)
 * --------------
 * This section is used to list and describe any allergies, adverse reactions, and alerts that are pertinent to the
 * patient’s current or past medical history. At a minimum, currently active and any relevant historical
 * allergies and adverse reactions should be listed.
 */
$param = new stdClass();
$param->pid = $pid;
$patientAllergies = $Medical->getPatientAllergies($param);
$alerts = array();