示例#1
0
文件: Medical.php 项目: piiskop/pstk
 /**
  * get all medical sets
  * 
  * @access public
  * @return array all medical sets
  */
 public static function getMedicals()
 {
     /**
      * array all medical sets
      */
     $medicals = array();
     $medical1 = new Medical();
     $medical1->setIdMedical(1);
     $medical1->setBenefit("bloating");
     $medicals[$medical1->getIdMedical()] = $medical1;
     $medical2 = new Medical();
     $medical2->setIdMedical(2);
     $medical2->setBenefit("vomiting");
     $medicals[$medical2->getIdMedical()] = $medical2;
     $medical3 = new Medical();
     $medical3->setIdMedical(3);
     $medical3->setBenefit("headache");
     $medicals[$medical3->getIdMedical()] = $medical3;
     return $medicals;
 }
示例#2
0
<?php

require_once 'Medical.php';
require_once 'Plant.php';
$plants = new Plant();
$plants = Plant::getPlants();
$plants[1]->insertIdOfMedical(1);
$plants[2]->insertIdOfMedical(2);
$plants[3]->insertIdOfMedical(3);
$plants[3]->insertIdOfMedical(2);
$medicals = Medical::getMedicals();
$medicals[1]->insertIdOfPlant(1);
$medicals[2]->insertIdOfPlant(3);
$medicals[3]->insertIdOfPlant(2);
$medicals[3]->insertIdOfPlant(2);
foreach ($medicals as $idOfMedicals => $medi) {
    echo "<br>" . $medi->getBenefit() . ': ';
    foreach ($medi->getIdOfPlant() as $medId) {
        echo $plants[$medId]->getName() . ' ';
    }
}
foreach ($plants as $idOfPlants => $pla) {
    echo "<br>" . $pla->getName() . ': ';
    foreach ($pla->getIdOfMedicals() as $plaId) {
        echo $medicals[$plaId]->getBenefit() . ' ';
    }
}
示例#3
0
 public function show($id)
 {
     $this->breadcrumb->append_crumb('Home', base_url());
     $this->breadcrumb->append_crumb('Staff Detail', base_url() . '');
     $staff = new Staff();
     $data['staff'] = $staff->where('staff_id', $id)->get();
     $family = new Family();
     $data['families'] = $family->where('staff_fam_staff_id', $data['staff']->staff_id)->get();
     $work = new Work();
     $data['works'] = $work->where('staff_id', $data['staff']->staff_id)->get();
     $education = new Education();
     $data['educations'] = $education->where('staff_id', $data['staff']->staff_id)->get();
     $medical = new Medical();
     $data['medicals'] = $medical->where('staff_id', $data['staff']->staff_id)->get();
     $asset_detail = new Asset_Detail();
     $data['asset_details'] = $asset_detail->where('staff_id', $data['staff']->staff_id)->get();
     $data['btn_back'] = anchor('staffs/', 'Back');
     $data['btn_edit'] = anchor('staffs/edit/' . $data['staff']->staff_id, 'Edit');
     $this->load->view('staffs/show', $data);
 }
示例#4
0
 function delete()
 {
     $medical = new Medical();
     $medical->_delete($this->uri->segment(5));
     redirect('staffs/' . $this->staff_id . '/medical_histories/index');
 }
示例#5
0
 private function getObjectiveExtraDataByEid($eid)
 {
     $ExtraData = '';
     $medications = $this->medical->getPatientMedicationsByEncounterID($eid);
     if (!empty($medications)) {
         $lis = '';
         foreach ($medications as $foo) {
             $lis .= '<li>' . $foo['medication'] . ' ' . $foo['dose'] . ' ' . $foo['dose_mg'] . '<br>';
             $lis .= 'Instruction: ' . $foo['take_pills'] . ' ' . $foo['type'] . ' ' . $foo['by'] . ' ' . $foo['prescription_often'] . ' ' . $foo['prescription_when'] . '<br>';
             $lis .= 'Dispense: ' . $foo['dispense'] . '  Refill: ' . $foo['refill'] . ' </li>';
         }
         $ExtraData .= '<p>Medications:</p>';
         $ExtraData .= '<ul class="ProgressNote-ul">' . $lis . '</ul>';
     }
     $immunizations = $this->medical->getImmunizationsByEncounterID($eid);
     if (!empty($immunizations)) {
         $lis = '';
         foreach ($immunizations as $foo) {
             $lis .= '<li>Immunization name: ' . $foo['immunization_name'] . '<br>';
             $lis .= 'Immunization ID: ' . $foo['immunization_id'] . '<br>';
             $lis .= 'Manufacturer: ' . $foo['manufacturer'] . '<br>';
             $lis .= 'Lot Number: ' . $foo['lot_number'] . '<br>';
             $lis .= 'Dosis: ' . $foo['dosis'] . '<br>';
             $lis .= 'Administered By: ' . $foo['administered_by'] . ' </li>';
         }
         $ExtraData .= '<p>Immunizations:</p>';
         $ExtraData .= '<ul class="ProgressNote-ul">' . $lis . '</ul>';
     }
     $allergies = $this->medical->getAllergiesByEncounterID($eid);
     if (!empty($allergies)) {
         $lis = '';
         foreach ($allergies as $foo) {
             $lis .= '<li>Allergy: ' . $foo['allergy'] . ' (' . $foo['allergy_type'] . ')<br>';
             $lis .= 'Reaction: ' . $foo['reaction'] . '<br>';
             $lis .= 'Severity: ' . $foo['severity'] . '<br>';
             $lis .= 'Location: ' . $foo['location'] . '<br>';
             $lis .= 'Active?: ' . ($foo['end_date'] != null ? 'Yes' : 'No') . '</li>';
         }
         $ExtraData .= '<p>Allergies:</p>';
         $ExtraData .= '<ul class="ProgressNote-ul">' . $lis . '</ul>';
     }
     $surgeries = $this->medical->getPatientSurgeryByEncounterID($eid);
     if (!empty($surgeries)) {
         $lis = '';
         foreach ($surgeries as $foo) {
             //			    $lis .= '<li>Immunization name: '.$foo['immunization_name'].'<br>';
             //			    $lis .= 'Immunization ID: ' .$foo['immunization_id'].'<br>';
             //			    $lis .= 'Administered By: '.$foo['administered_by'].' </li>';
         }
         $ExtraData .= '<p>Surgeries:</p>';
         $ExtraData .= '<ul class="ProgressNote-ul">' . $lis . '</ul>';
     }
     $dental = $this->medical->getPatientDentalByEncounterID($eid);
     if (!empty($dental)) {
         $lis = '';
         foreach ($dental as $foo) {
             //			    $lis .= '<li>Immunization name: '.$foo['immunization_name'].'<br>';
             //			    $lis .= 'Immunization ID: ' .$foo['immunization_id'].'<br>';
             //			    $lis .= 'Administered By: '.$foo['administered_by'].' </li>';
         }
         $ExtraData .= '<p>Dental:</p>';
         $ExtraData .= '<ul class="ProgressNote-ul">' . $lis . '</ul>';
     }
     $activeProblems = $this->medical->getMedicalIssuesByEncounterID($eid);
     if (!empty($activeProblems)) {
         $lis = '';
         foreach ($activeProblems as $foo) {
             $lis .= '<li>Immunization name: ' . $foo['immunization_name'] . '<br>';
             //			    $lis .= 'Immunization ID: ' .$foo['immunization_id'].'<br>';
             //			    $lis .= 'Administered By: '.$foo['administered_by'].' </li>';
         }
         $ExtraData .= '<p>Active Problems:</p>';
         $ExtraData .= '<ul class="ProgressNote-ul">' . $lis . '</ul>';
     }
     $preventiveCare = $this->preventiveCare->getPreventiveCareDismissPatientByEncounterID($eid);
     if (!empty($preventiveCare)) {
         $lis = '';
         foreach ($preventiveCare as $foo) {
             $lis .= '<li>Description: ' . $foo['description'] . '<br>';
             $lis .= 'Reason: ' . $foo['reason'] . '<br>';
             $lis .= 'Observation: ' . $foo['observation'] . ' </li>';
         }
         $ExtraData .= '<p>Preventive Care:</p>';
         $ExtraData .= '<ul class="ProgressNote-ul">' . $lis . '</ul>';
     }
     return $ExtraData;
 }
示例#6
0
$pid = $_REQUEST['pid'];
/**
 * Load all the data for the CCR XML data and loops
 */
$patientGUID = UUID::v4();
$softwareGUID = UUID::v4();
$pdfDocumentGUID = UUID::v4();
$family1GUID = UUID::v4();
$family2GUID = UUID::v4();
$familyMemberLink1 = UUID::v4();
$familyMemberLink2 = UUID::v4();
$manufacturerGUID = UUID::v4();
$healthProviderGUID = UUID::v4();
$Patient = new Patient();
$Encounter = new Encounter();
$Medical = new Medical();
$Facilities = new Facilities();
/**
 * Actors - (SHALL)
 * ------
 * Used as a container to define all of the individuals, organizations, locations, and systems associated with
 * data in the summary document. Within the CCR data set, an Actor is a <Person>, <Organization> or
 * <Device>. These correspond to the HL7 RIM Entity classes: LivingSubject, Person, Organization or
 * Device, and are mapped accordingly to these classes as exposed in a CDA document. Whereas ASTM CCR
 * enumerates all Actors in the CCR Footer and references those Actors from within the CCR Body with the
 * <ActorLink> element, CCD defines many participants within the document header and body.
 */
$patientData = $Patient->getPatientDemographicDataByPid($pid);
$actors = array('Actor' => array(array('ActorObjectID' => $patientGUID, 'Person' => array('Name' => array('CurrentName' => array('Given' => $patientData['fname'], 'Family' => $patientData['lname'], 'Suffix' => $patientData['title'])), 'DateOfBirth' => array('ExactDateTime' => date("Y-m-d", strtotime($patientData['DOB']))), 'Gender' => array('Text' => $patientData['sex'], 'Code' => array('Value' => $patientData['sex'] == 'Male' ? 'M' : 'F', 'CodingSystem' => '2.16.840.1.113883.5.1'))), 'IDs' => array(array('Type' => array('Text' => $patientData['pid']), 'ID' => '2-16-840-1-113883-19-5-996756495', 'IssuedBy' => array('ActorID' => '2.16.840.1.113883.19.5'), 'Source' => array('Actor' => array('ActorID' => $softwareGUID))), array('Type' => array('Text' => 'Covered party ID'), 'ID' => '14d4a520-7aae-11db-9fe1-0800200c9a66', 'IssuedBy' => array('ActorID' => '329fcdf0-7ab3-11db-9fe1-0800200c9a66'), 'Source' => array('Actor' => array('ActorID' => $softwareGUID)))), 'Source' => array('Actor' => array('ActorID' => $softwareGUID)))));
/**
 * References - (OPTIONAL)