* pertinent to the patient historically at the time the document is generated. The section may contain all * procedures for the period of time being summarized, but should include notable procedures. */ $procedures = array('Procedure' => array(array('CCRDocumentObjectID' => UUID::v4(), 'DateTime' => array('Type' => array('Text' => 'Procedure Date'), 'ExactDateTime' => '1998'), 'Description' => array('Text' => 'Total hip replacement, left', 'ObjectAttribute' => array('Attribute' => 'Laterality', 'AttributeValue' => array('Value' => 'Left', 'Code' => array('Value' => '7771000', 'CodingSystem' => 'SNOMED CT'))), 'Code' => array('Value' => '52734007', 'CodingSystem' => 'SNOMED CT')), 'Status' => array('Text' => 'Final Results'), 'Source' => array('Actor' => array('ActorID' => $softwareGUID)), 'InternalCCRLink' => array('LinkID' => UUID::v4(), 'LinkRelationship' => 'Implanted equipment')))); /** * Results section - (SHALL) * --------------- * This section contains the results of observations generated by laboratories, imaging procedures, and other * procedures. The scope includes hematology, chemistry, serology, virology, toxicology, microbiology, plain * x-ray, ultrasound, CT, MRI, angiography, cardiac echo, nuclear medicine, pathology, and procedure * observations. The section may contain all results for the period of time being summarized, but should * include notable results such as abnormal values or relevant trends. */ $param = new stdClass(); $param->parent_id = $pid; $patientResult = $Medical->getPatientLabsResults($param); $results[] = array(); foreach ($patientResult as $item) { $results[] = array('Result' => array(array('CCRDocumentObjectID' => UUID::v4(), 'DateTime' => array('Type' => array('Text' => 'Assessment Time'), 'ExactDateTime' => date("Y-m-d", strtotime($item['date']))), 'Description' => array('Text' => $item['observation_value'], 'Code' => array('Value' => $item['observation_loinc'], 'CodingSystem' => 'LOINC')), 'Status' => array('Text' => 'Final Results'), 'Source' => array('Actor' => array('ActorID' => $softwareGUID)), 'Test' => array(array('CCRDocumentObjectID' => UUID::v4(), 'DateTime' => array('Type' => array('Text' => 'Assessment Time'), 'ExactDateTime' => date("Y-m-d", strtotime($item['date']))), 'Description' => array('Text' => 'HGB', 'Code' => array('Value' => '30313-1', 'CodingSystem' => 'LOINC')), 'Status' => array('Text' => 'Final Results'), 'Source' => array('Actor' => array('ActorID' => $softwareGUID)), 'TestResult' => array('Value' => '13.2', 'Units' => array('Unit' => 'g/dl')), 'NormalResult' => array('Normal' => array(array('Description' => array('Text' => 'M 13-18 g/dl; F 12-16 g/dl', 'Source' => array('Actor' => array('ActorID' => $softwareGUID))))))))))); } /** * Vital Signs section - (SHALL) * ------------------- * This section contains current and historically relevant vital signs, such as blood pressure, heart rate, * respiratory rate, height, weight, body mass index, head circumference, crown-to-rump length, and pulse * oximetry. The section may contain all vital signs for the period of time being summarized, but at a * minimum should include notable vital signs such as the most recent, maximum and/or minimum, or both, * baseline, or relevant trends. */ $vitalSigns = $Encounter->getVitalsByPid($pid); $vitals = array();