Пример #1
0
 /**
  * Build QPD segement
  *
  * @param CHL7v2Event $event Event
  *
  * @return null
  */
 function build(CHL7v2Event $event)
 {
     parent::build($event);
     $objects = $this->objects;
     // QAK-1: Query Tag (ST) (optional)
     $hl7_message_initiator = $event->message->_hl7_message_initiator;
     $QPD_request = $hl7_message_initiator->getSegmentByName("QPD")->getStruct();
     $data[] = isset($QPD_request[1][0]) ? $QPD_request[1][0] : "PDQPDC_{$event->code}";
     // QAK-2: Query Response Status (ID) (optional)
     if ($objects == null) {
         $data[] = "AE";
     } elseif (count($objects) == 0) {
         $data[] = "NF";
     } else {
         $data[] = "OK";
     }
     // QAK-3: User Parameters (in successive fields) (Varies) (optional)
     $data[] = null;
     // QAK-4: Hit Count (NM) (optional)
     $data[] = null;
     // QAK-5: This payload (NM) (optional)
     $data[] = null;
     // QAK-6: Hits remaining (NM) (optional)
     $data[] = null;
     $this->fill($data);
 }
Пример #2
0
 /**
  * Build ACC segement
  *
  * @param CHL7v2Event $event Event
  *
  * @return null
  */
 function build(CHL7v2Event $event)
 {
     parent::build($event);
     // ACC-1: Accident Date/Time (TS) <b>optional </b>
     $data[] = null;
     // ACC-2: Accident Code (CE) <b>optional </b>
     $data[] = null;
     // ACC-3: Accident Location (ST) <b>optional </b>
     $data[] = null;
     // ACC-4: Auto Accident State (CE) <b>optional </b>
     $data[] = null;
     // ACC-5: Accident Job Related Indicator (ID) <b>optional </b>
     $data[] = null;
     // ACC-6: Accident Death Indicator (ID) <b>optional </b>
     $data[] = null;
     // ACC-7: Entered By (XCN) <b>optional </b>
     $data[] = null;
     // ACC-8: Accident Description (ST) <b>optional </b>
     $data[] = null;
     // ACC-9: Brought In By (ST) <b>optional </b>
     $data[] = null;
     // ACC-10: Police Notified Indicator (ID) <b>optional </b>
     $data[] = null;
     // ACC-11: Accident Address (XAD) <b>optional </b>
     $data[] = null;
     $this->fill($data);
 }
Пример #3
0
 /**
  * Build LOC segement
  *
  * @param CHL7v2Event $event Event
  *
  * @return null
  */
 function build(CHL7v2Event $event)
 {
     parent::build($event);
     $entity = $this->entity;
     $localisation_type = array_search(get_class($entity), CHL7v2EventMFN::$entities);
     $primary_key = $localisation_type . $entity->_id;
     // LOC-1: Primary Key Value-LOC - LOC (PL) (Requis)
     $data[] = $primary_key;
     // LOC-2: Location Description - LOC (ST) (Optional)
     $data[] = null;
     // LOC-3: Location Type - LOC (IS) (Requis)
     $data[] = $localisation_type;
     // LOC-4: Organization Name - LOC (XON) (Optional)
     $data[] = $entity->_name;
     // LOC-5: Location Address - LOC (XAD) (Optional)
     $data[] = null;
     // LOC-6: Location Phone - LOC (XTN) (Optional)
     $data[] = null;
     // LOC-7: License Number - LOC (CE) (Optional)
     $data[] = null;
     // LOC-8: Location Equipment - LOC (IS) (Optional)
     $data[] = null;
     // LOC-9: Location Service Code - LOC (IS) (Optional)
     $data[] = null;
     $this->fill($data);
 }
Пример #4
0
 /**
  * Build PD1 segement
  *
  * @param CHL7v2Event $event Event
  *
  * @return null
  */
 function build(CHL7v2Event $event)
 {
     parent::build($event);
     $patient = $this->patient;
     $data = array();
     // PD1-1: Living Dependency (IS) (optional repeating)
     $data[] = null;
     // PD1-2: Living Arrangement (IS) (optional)
     // Table 0220
     // A - Alone - Seul
     // F - Family
     // I - Institution
     // R - Relative
     // S - Spouse Only
     // U - Unknown
     // H - Homeless - Sans domicile fixe
     $data[] = "U";
     // PD1-3: Patient Primary Facility (XON) (optional repeating)
     $data[] = null;
     // PD1-4: Patient Primary Care Provider Name & ID No. (XCN) (optional repeating)
     $data[] = null;
     // PD1-5: Student Indicator (IS) (optional)
     $data[] = null;
     // PD1-6: Handicap (IS) (optional)
     $data[] = null;
     // PD1-7: Living Will Code (IS) (optional)
     $data[] = null;
     // PD1-8: Organ Donor Code (IS) (optional)
     $data[] = null;
     // PD1-9: Separate Bill (ID) (optional)
     $data[] = null;
     // PD1-10: Duplicate Patient (CX) (optional repeating)
     $data[] = null;
     // PD1-11: Publicity Code (CE) (optional)
     $data[] = null;
     // PD1-12: Protection Indicator (ID) (optional)
     // Table - 0136
     // Y - Oui - Accès protégé à l'information du patient
     // N - Non - Accès normal à l'information du patient
     $data[] = $patient->vip ? "Y" : "N";
     // PD1-13: Protection Indicator Effective Date (DT) (optional)
     $data[] = null;
     // PD1-14: Place of Worship (XON) (optional repeating)
     $data[] = null;
     // PD1-15: Advance Directive Code (CE) (optional repeating)
     $data[] = null;
     // PD1-16: Immunization Registry Status (IS) (optional)
     $data[] = null;
     // PD1-17: Immunization Registry Status Effective Date (DT) (optional)
     $data[] = null;
     // PD1-18: Publicity Code Effective Date (DT) (optional)
     $data[] = null;
     // PD1-19: Military Branch (IS) (optional)
     $data[] = null;
     // PD1-20: Military Rank/Grade (IS) (optional)
     $data[] = null;
     // PD1-21: Military Status (IS) (optional)
     $data[] = null;
     $this->fill($data);
 }
Пример #5
0
 /**
  * Build RCP segement
  *
  * @param CHL7v2Event $event Event
  *
  * @return null
  */
 function build(CHL7v2Event $event)
 {
     parent::build($event);
     $patient = $this->patient;
     $quantity_limited_request = isset($patient->_quantity_limited_request) ? $patient->_quantity_limited_request : null;
     // RCP-1: Query Priority (ID) (optional)
     $data[] = "I";
     // RCP-2: Quantity Limited Request (CQ) (optional)
     if ($quantity_limited_request) {
         $data[] = array(array($quantity_limited_request, "RD"));
     } else {
         $data[] = null;
     }
     // RCP-3: Response Modality (CE) (optional)
     $data[] = null;
     // RCP-4: Execution and Delivery Time (TS) (optional)
     $data[] = null;
     // RCP-5: Modify Indicator (ID) (optional)
     $data[] = null;
     // RCP-6: Sort-by Field (SRT) (optional repeating)
     $data[] = null;
     // RCP-7: Segment group inclusion (ID) (optional repeating)
     $data[] = null;
     $this->fill($data);
 }
Пример #6
0
 /**
  * Build MSA segement
  *
  * @param CHL7v2Event $event Event
  *
  * @return null
  */
 function build(CHL7v2Event $event)
 {
     parent::build($event);
     $acknowledgment = $this->acknowledgment;
     $data = array();
     // MSA-1: Acknowledgment Code (ID)
     // Table - 0008
     // AA  - Original mode: Application Accept - Enhanced mode: Application acknowledgment: Accept
     // AE  - Original mode: Application Error - Enhanced mode: Application acknowledgment: Error
     // AR  - Original mode: Application Reject - Enhanced mode: Application acknowledgment: Reject
     // CA  - Enhanced mode: Accept acknowledgment: Commit Accept
     // CE  - Enhanced mode: Accept acknowledgment: Commit Error
     // CR  - Enhanced mode: Accept acknowledgment: Commit Reject
     $data[] = $acknowledgment->ack_code;
     // MSA-2: Message Control ID
     $data[] = $acknowledgment->message_control_id;
     // MSA-3: Text Message (ST) (optional)
     $data[] = null;
     // MSA-4: Expected Sequence Number (NM) (optional)
     $data[] = null;
     // MSA-5: Delayed Acknowledgment Type (ID) (optional)
     $data[] = null;
     // MSA-6: Error Condition (CE) (optional)
     $data[] = $acknowledgment->hl7_error_code ? array($acknowledgment->hl7_error_code) : null;
     $this->fill($data);
 }
Пример #7
0
 /**
  * QID - Represents an HL7 Query Identification Segment
  *
  * @param CPatient $patient
  *
  * @return void
  */
 function addQID(CPatient $patient)
 {
     /** @var CHL7v2SegmentQID $QID */
     $QID = CHL7v2Segment::create("QID", $this->message);
     $QID->patient = $patient;
     $QID->build($this);
 }
Пример #8
0
 /**
  * Build QPD segement
  *
  * @param CHL7v2Event $event Event
  *
  * @return null
  */
 function build(CHL7v2Event $event)
 {
     parent::build($event);
     if ($event->code == "Q22" || $event->code == "ZV1") {
         $data = $this->buildIHEPDQQuery();
     } elseif ($event->code == "Q23") {
         $data = $this->buildIHEPIXQuery();
     } else {
         // QPD-1 : Message Query Name (CE)
         $data[] = null;
         // QPD-2 : Query Tag (ST)
         $data[] = null;
         // QPD-3 : User Parameters (in successive fields) (Varies) (QIP)
         $data[] = null;
         // QPD-4 : Search Confidence Threshold (NM)
         $data[] = null;
         // QPD-5 : Algorithm Name (ST)
         $data[] = null;
         // QPD-6 : Algorithm Version (ST)
         $data[] = null;
         // QPD-7 : Algorithm Description (ST)
         $data[] = null;
         // QPD-8 : What domains returned (CX)
         $data[] = null;
     }
     $this->fill($data);
 }
Пример #9
0
 /**
  * Build EVN segement
  *
  * @param CHL7v2Event $event Event
  *
  * @return null
  */
 function build(CHL7v2Event $event)
 {
     parent::build($event);
     $version = $event->message->version;
     $data = array();
     // EVN-1: Event Type Code (ID) (optional)
     // This field has been retained for backward compatibility only
     $data[] = $version < "2.5" ? $event->code : null;
     // EVN-2: Recorded Date/Time (TS)
     $data[] = CMbDT::dateTime();
     // EVN-3: Date/Time Planned Event (TS)(optional)
     $data[] = $this->planned_datetime;
     // EVN-4: Event Reason Code (IS) (optional)
     // Table 062
     // 01 - Patient request
     // 02 - Physician/health practitioner order
     // 03 - Census management
     // O  - Other
     // U  - Unknown
     $data[] = null;
     // EVN-5: Operator ID (XCN) (optional repeating)
     //$data[] = $this->getXCN($event->last_log->loadRefUser());
     $data[] = null;
     // EVN-6: Event Occurred (TS) (optional)
     $data[] = $this->occured_datetime;
     // EVN-7: Event Facility (HD) (optional)
     $data[] = null;
     $this->fill($data);
 }
Пример #10
0
 /**
  * Build MRG segement
  *
  * @param CHL7v2Event $event Event
  *
  * @return null
  */
 function build(CHL7v2Event $event)
 {
     parent::build($event);
     $receiver = $event->_receiver;
     $patient_eliminee = $this->patient_eliminee;
     $group = $receiver->_ref_group;
     $data = array();
     $patient = $patient_eliminee;
     $mrg5 = null;
     if ($patient_eliminee instanceof CSejour) {
         $sejour = $patient_eliminee;
         $patient = $sejour->loadRefPatient();
         $mrg5 = $sejour->_NDA;
     }
     // MRG-1: Prior Patient Identifier List (CX) (repeating)
     $data[] = $this->getPersonIdentifiers($patient, $group, $receiver);
     // MRG-2: Prior Alternate Patient ID (CX) (optional repeating)
     $data[] = null;
     // MRG-3: Prior Patient Account Number (CX) (optional)
     $data[] = null;
     // MRG-4: Prior Patient ID (CX) (optional)
     $data[] = null;
     // MRG-5: Prior Visit Number (CX) (optional)
     $data[] = $mrg5;
     // MRG-6: Prior Alternate Visit ID (CX) (optional)
     $data[] = null;
     // MRG-7: Prior Patient Name (XPN) (optional repeating)
     $data[] = $this->getXPN($patient, $receiver);
     $this->fill($data);
 }
Пример #11
0
 /**
  * Build AIL segement
  *
  * @param CHL7v2Event $event Event
  *
  * @return null
  */
 function build(CHL7v2Event $event)
 {
     parent::build($event);
     $appointment = $this->appointment;
     $data = array();
     // AIL-1: Set ID - AIL (SI)
     $data[] = $this->set_id;
     // AIL-2: Segment Action Code (ID) (optional)
     $data[] = $this->getSegmentActionCode($event);
     // AIL-3: Location Resource ID (PL) (optional repeating)
     $data[] = array(array(null, null, null, null, null, null, $appointment->loadRefGroup()->_view));
     // AIL-4: Location Type-AIL (CE) (optional)
     $data[] = null;
     // AIL-5: Location Group (CE) (optional)
     $data[] = null;
     // AIL-6: Start Date/Time (TS) (optional)
     $data[] = null;
     // AIL-7: Start Date/Time Offset (NM) (optional)
     $data[] = null;
     // AIL-8: Start Date/Time Offset Units (CE) (optional)
     $data[] = null;
     // AIL-9: Duration (NM) (optional)
     $data[] = null;
     // AIL-10: Duration Units (CE) (optional)
     $data[] = null;
     // AIL-11: Allow Substitution Code (IS) (optional)
     $data[] = null;
     // AIL-12: Filler Status Code (CE) (optional)
     $data[] = $this->getFillerStatutsCode($appointment);
     $this->fill($data);
 }
Пример #12
0
 /**
  * @see parent::build
  */
 function build(CHPREvent $event)
 {
     parent::build($event);
     $message = $event->message;
     $data = array();
     // H-1 : Field Separator
     $data[] = $message->fieldSeparator;
     // H-2: Encoding Characters (ST)
     $data[] = substr($message->getEncodingCharacters(), 1);
     // H-3 : Message ID
     $data[] = $event->_exchange_hpr->_id;
     // H-4 : Password
     $data[] = null;
     // H-5 : Sender ID
     $data[] = $event->_sender->nom;
     // H-6 : Sender address
     $data[] = null;
     // H-7 : Context
     $data[] = $event->event_type;
     // H-8 : Sender phone
     $data[] = null;
     // H-9 : Transmission characteristics
     $data[] = null;
     // H-10 : Receiver ID
     $data[] = array($event->_receiver->_id, $event->_receiver->nom);
     // H-11 : Comment
     $data[] = null;
     // H-12 : Processing ID
     $data[] = null;
     // H-13 : Version and Type
     $data[] = array(array($event->version, $event->_exchange_hpr->type));
     // H-14 : Date/Time of Message
     $data[] = CMbDT::dateTime();
     $this->fill($data);
 }
Пример #13
0
 /**
  * Build LCH segement
  *
  * @param CHL7v2Event $event Event
  *
  * @return null
  */
 function build(CHL7v2Event $event)
 {
     parent::build($event);
     $entity = $this->entity;
     $code = $this->code;
     $primary_key = array_search(get_class($entity), CHL7v2EventMFN::$entities);
     $primary_key = $primary_key . $entity->_id;
     mbTrace($entity);
     // LCH-1: Primary Key Value -LCH - LCH (PL) (Requis)
     $data[] = $primary_key;
     // LCH-2: Segment Action Code - LCH (ID) (Optional)
     $data[] = null;
     // LCH-3: Segment Unique Key - LCH (EI) (Optional)
     $data[] = null;
     // LCH-4: Location Characteristic ID - LCH (CWE) (Requis)
     $HL7_value = CHL7v2TableEntry::mapTo("7878", $code);
     $data[] = array(array($HL7_value, CHL7v2TableEntry::getDescription("7878", $HL7_value), "L"));
     // if si dans la chaine tu as RSPNSBL
     // alors :
     // $user = $entity->loadRefUser();
     // $user->$code
     // else
     // $entity->$code
     // LCH-5: Location Characteristic Value - LCH (CWE) (Requis)
     $data[] = null;
     $this->fill($data);
 }
Пример #14
0
 /**
  * BuildORC segement
  *
  * @param CHL7v2Event $event Event
  *
  * @return void
  */
 function build(CHL7v2Event $event)
 {
     parent::build($event);
     // ZDS-1: Study Instance UID (RP)
     // 1 reference pointer^2 Application ID^3 Type of Data^4 Subtype
     $data[] = null;
     $this->fill($data);
 }
 /**
  * Build QPD segement
  *
  * @param CHL7v2Event $event Event
  *
  * @return null
  */
 function build(CHL7v2Event $event)
 {
     parent::build($event);
     $hl7_message_initiator = $event->message->_hl7_message_initiator;
     /** @var CHL7v2SegmentQPD $QPD_request */
     $QPD_request = $hl7_message_initiator->getSegmentByName("QPD");
     $this->fill($QPD_request->getStruct());
 }
Пример #16
0
 /**
  * Build QID segement
  *
  * @param CHL7v2Event $event Event
  *
  * @return null
  */
 function build(CHL7v2Event $event)
 {
     parent::build($event);
     // QID-1: Query Tag (ST) (optional)
     $data[] = $this->patient->_query_tag;
     // QID-2: Message Query Name (CE) (optional)
     $data[] = "IHE PDQ Query";
     $this->fill($data);
 }
Пример #17
0
 /**
  * Build DSC segement
  *
  * @param CHL7v2Event $event Event
  *
  * @return null
  */
 function build(CHL7v2Event $event)
 {
     parent::build($event);
     $patient = $this->patient;
     // DSC-1: Continuation Pointer (ST) (optional)
     $data[] = $patient->_pointer;
     // DSC-2: Continuation Style (ID) (optional)
     $data[] = "I";
     $this->fill($data);
 }
Пример #18
0
 /**
  * Build ZFP segement
  *
  * @param CHL7v2Event $event Event
  *
  * @return null
  */
 function build(CHL7v2Event $event)
 {
     parent::build($event);
     $patient = $this->patient;
     // ZFP-1: Activité socio-professionnelle (nomemclature INSEE)
     $data[] = $patient->csp ? substr($patient->csp, 0, 1) : null;
     // ZFP-2: Catégorie socio-professionnelle (nomemclature INSEE)
     $data[] = $patient->csp;
     $this->fill($data);
 }
Пример #19
0
 /**
  * Build ZBE segement
  *
  * @param CHL7v2Event $event Event
  *
  * @return null
  */
 function build(CHL7v2Event $event)
 {
     parent::build($event);
     $receiver = $event->_receiver;
     $sejour = $this->sejour;
     $movement = $this->movement;
     $affectation = $this->curr_affectation;
     if ($this->other_affectation) {
         $affectation = $this->other_affectation;
     }
     $action_movement = null;
     if ($sejour->_cancel_hospitalization) {
         $action_movement = "CANCEL";
     } else {
         foreach (self::$actions as $action => $events) {
             if (in_array($event->code, $events)) {
                 $action_movement = $action;
             }
         }
     }
     // ZBE-1: Movement ID (EI) (optional)
     $identifiers[] = array($movement->_view, CAppUI::conf("hl7 assigning_authority_namespace_id"), CAppUI::conf("hl7 assigning_authority_universal_id"), CAppUI::conf("hl7 assigning_authority_universal_type_id"));
     $idexMovement = CIdSante400::getMatch("CMovement", $receiver->_tag_movement, null, $movement->_id);
     if ($idexMovement->_id) {
         $configs = $receiver->_configs;
         $identifiers[] = array($idexMovement->id400, $configs["assigning_authority_namespace_id"], $configs["assigning_authority_universal_id"], $configs["assigning_authority_universal_type_id"]);
     }
     $data[] = $identifiers;
     // ZBE-2: Start of Movement Date/Time (TS)
     $start_of_movement = $action_movement == "CANCEL" ? $movement->last_update : $movement->start_of_movement;
     $data[] = $start_of_movement > $sejour->sortie ? $sejour->sortie : $start_of_movement;
     // ZBE-3: End of Movement Date/Time (TS) (optional)
     // Forbidden (IHE France)
     $data[] = null;
     // ZBE-4: Action on the Movement (ID)
     $data[] = $action_movement;
     // ZBE-5: Indicator "Historical Movement" (ID)
     $data[] = $movement->_current ? "N" : "Y";
     // ZBE-6: Original trigger event code (ID) (optional)
     $data[] = $action_movement == "UPDATE" || $action_movement == "CANCEL" ? $movement->original_trigger_code : null;
     $ufs = $sejour->getUFs(null, $affectation->_id);
     // ZBE-7: Ward of medical responsibility in the period starting with this movement (XON) (optional)
     $uf_type = $receiver->_configs["build_ZBE_7"];
     $uf_medicale = isset($ufs[$uf_type]) ? $ufs[$uf_type] : null;
     if (isset($uf_medicale->_id)) {
         $data[] = array(array($uf_medicale->libelle, null, null, null, null, $this->getAssigningAuthority("mediboard"), "UF", null, null, $uf_medicale->code));
     } else {
         $data[] = null;
     }
     // Traitement des segments spécifiques extension PAM
     $this->fillOtherSegments($data, $ufs, $event);
     $this->fill($data);
 }
Пример #20
0
 /**
  * Build RGS segement
  *
  * @param CHL7v2Event $event Event
  *
  * @return null
  */
 function build(CHL7v2Event $event)
 {
     parent::build($event);
     $data = array();
     // RGS-1: Set ID - RGS (SI)
     $data[] = $this->set_id;
     // RGS-2: Segment Action Code (ID) (optional)
     $data[] = $this->getSegmentActionCode($event);
     // RGS-3: Resource Group ID (CE) (optional)
     $data[] = $this->appointment->_id;
     $this->fill($data);
 }
Пример #21
0
 /**
  * @see parent::build
  */
 function build(CHPREvent $event)
 {
     parent::build($event);
     $error = $this->error;
     $acknowledgment = $this->acknowledgment;
     $exchange_hpr = $event->_exchange_hpr;
     $data = array();
     if ($error instanceof CHL7v2Error) {
         // ERR-1: Segment Row
         $data[] = $acknowledgment->_row;
         // ERR-2: Filename
         $data[] = $exchange_hpr->nom_fichier;
         // ERR-3: Date / Time of receipt
         $data[] = $exchange_hpr->date_production;
         // ERR-4: Severity
         $data[] = null;
         // ERR-5: Line number
         $data[] = null;
         // ERR-6: Error Location
         $data[] = null;
         // ERR-7: Field Position
         $data[] = null;
         // ERR-8: Error value
         $data[] = null;
         // ERR-9: Error type
         $data[] = null;
         // ERR-10: Original Text
         $data[] = null;
     } else {
         // ERR-1
         $data[] = $acknowledgment->_row;
         // ERR-2
         $data[] = $exchange_hpr->nom_fichier;
         // ERR-3
         $data[] = $exchange_hpr->date_production;
         // ERR-4
         $data[] = $error[0];
         // ERR-5
         $data[] = null;
         // ERR-6
         $data[] = array(array($error[2][0], $error[2][1], $error[2][2]));
         // ERR-7
         $data[] = null;
         // ERR-8
         $data[] = $error[4];
         // ERR-9
         $data[] = $error[5];
         // ERR-10
         $data[] = CMbString::removeAllHTMLEntities($error[6]);
     }
     $this->fill($data);
 }
Пример #22
0
 /**
  * Build ZFD segement
  *
  * @param CHL7v2Event $event Event
  *
  * @return null
  */
 function build(CHL7v2Event $event)
 {
     parent::build($event);
     $patient = $this->patient;
     // ZFD-1: Date lunaire
     if (CMbDT::isLunarDate($patient->naissance)) {
         $date = explode("-", $patient->naissance);
         $data[] = array($date[2], $date[1], $date[0]);
     } else {
         $data[] = null;
     }
     // ZFD-2: Nombre de semaines de gestation
     $data[] = null;
     $this->fill($data);
 }
Пример #23
0
 /**
  * Build ZFM segement
  *
  * @param CHL7v2Event $event Event
  *
  * @return null
  */
 function build(CHL7v2Event $event)
 {
     parent::build($event);
     $sejour = $this->sejour;
     // ZFM-1: Mode d'entrée PMSI
     $data[] = $sejour->mode_entree;
     // ZFM-2: Mode de sortie PMSI
     // normal - transfert - mutation - deces
     $data[] = $this->getModeSortie($sejour);
     // ZFM-3: Mode de provenance PMSI
     $data[] = $this->getModeProvenance($sejour);
     // ZFM-4: Mode de destination PMSI
     $data[] = $sejour->destination;
     $this->fill($data);
 }
Пример #24
0
 /**
  * @see parent::build
  */
 function build(CHPREvent $event)
 {
     parent::build($event);
     $data = array();
     // L-1 : Segment Row (optional)
     $data[] = null;
     // L-2 : Not Use (optional)
     $data[] = null;
     // L-3 : Number Segment P (optional)
     $data[] = null;
     // L-4 : Number Segment of Message (optional)
     $data[] = null;
     // L-5 : Lot Number (optional)
     $data[] = null;
     $this->fill($data);
 }
Пример #25
0
 /**
  * Build MFI segement
  *
  * @param CHL7v2Event $event Event
  *
  * @return null
  */
 function build(CHL7v2Event $event)
 {
     parent::build($event);
     // MFI-1: Master File Identifier - MFI (CE) (Requis)
     $data[] = "LOC";
     // MFI-2: Master File Application Identifier - MFI (HD) (Requis)
     $data[] = "Mediboard_LOC_FRA";
     // MFI-3: File-Level Event Code - MFI (ID) (Requis)
     $data[] = "REP";
     // MFI-4: Enterd Date/Time - MFI (TS) (Optional)
     $data[] = null;
     // MFI-5: Effective Date/Time - MFI (TS) (Requis)
     $data[] = CMbDT::dateTime();
     // MFI-6: Response Level Code - MFI (ID) (Requis)
     $data[] = "AL";
     $this->fill($data);
 }
Пример #26
0
 /**
  * Build ROL segement
  *
  * @param CHL7v2Event $event Event
  *
  * @return null
  */
 function build(CHL7v2Event $event)
 {
     parent::build($event);
     $medecin = $this->medecin;
     $data = array();
     // ROL-1: Role Instance ID (EI) (optional)
     // The field is optional when used in ADT and Finance messages
     $data[] = null;
     // ROL-2: Action Code (ID)
     // Table - 0287
     // AD - ADD - Nouveau rôle du médecin
     // DE - DELETE - Suppression du rôle du médecin
     // UC - UNCHANGED - Notification du médecin à prendre en compte pour le rôle défini dans le contexte courant
     // UP - UPDATE - Mise à jour du rôle du médecin
     $data[] = $this->action;
     // ROL-3: Role-ROL (CE)
     // Table - 0443
     // AD   - Admitting - PV1.17 Médecin de la structure qui décide d'hospitaliser
     // AT   - Attending - PV1-7 Médecin responsable du patient pendant le séjour
     // CP   - Consulting Provider - Médecin consulté pour 2ème avis dans le cadre de la venue
     // FHCP - Family Health Care Professional - Médecin de famille. Utilisé dans les rares cas où il est distinct du médecin traitant
     // RP   - Referring Provider - PV1-8 Médecin adressant
     // RT   - Referred to Provider - Médecin correspondant
     // ODRP - Officialy Declared Referring Physician - Médecin Traitant
     // SUBS - Substitute - Remplaçant du médecin traitant
     $data[] = array(array($this->role_id, null, null, null, null, null));
     // ROL-4: Role Person (XCN) (repeating)
     $data[] = $this->getXCN($medecin, $event->_receiver);
     // ROL-5: Role Begin Date/Time (TS) (optional)
     $data[] = null;
     // ROL-6: Role End Date/Time (TS) (optional)
     $data[] = null;
     // ROL-7: Role Duration (CE) (optional)
     $data[] = null;
     // ROL-8: Role Action Reason (CE) (optional)
     $data[] = null;
     // ROL-9: Provider Type (CE) (optional repeating)
     $data[] = null;
     // ROL-10: Organization Unit Type (CE) (optional)
     $data[] = null;
     // ROL-11: Office/Home Address/Birthplace (XAD) (optional repeating)
     $data[] = null;
     // ROL-12: Phone (XTN) (optional repeating)
     $data[] = null;
     $this->fill($data);
 }
Пример #27
0
 /**
  * Build LRL segement
  *
  * @param CHL7v2Event $event Event
  *
  * @return null
  */
 function build(CHL7v2Event $event)
 {
     parent::build($event);
     $message = $event->message;
     // LRL-1: Primary Key Value-LRL - LRL (PL) (Requis)
     $data[] = null;
     // LRL-2: Segment Action Code (ID) (Optional)
     $data[] = null;
     // LRL-3: Segment Unique Key - LRL (EI) (Optional)
     $data[] = null;
     // LRL-4: Location Relationship ID - LRL (CWE) (Requis)
     $data[] = null;
     // LRL-5: Organizational Location Relationship Value - LRL (XON) (Conditional)
     $data[] = null;
     // LRL-6: Patient Location Relationship Value - LRL (PL) (Conditional)
     $data[] = null;
     $this->fill($data);
 }
Пример #28
0
 /**
  * Build OBX segement
  *
  * @param CHL7v2Event $event Event
  *
  * @return null
  */
 function build(CHL7v2Event $event)
 {
     parent::build($event);
     // OBX-1: Set ID - OBX (SI) (optional)
     $data[] = null;
     // OBX-2: Value Type (ID) (optional)
     $data[] = null;
     // OBX-3: Observation Identifier (CE)
     $data[] = null;
     // OBX-4: Observation Sub-ID (ST) (optional)
     $data[] = null;
     // OBX-5: Observation Value (Varies) (optional repeating)
     $data[] = null;
     // OBX-6: Units (CE) (optional)
     $data[] = null;
     // OBX-7: References Range (ST) (optional)
     $data[] = null;
     // OBX-8: Abnormal Flags (IS) (optional repeating)
     $data[] = null;
     // OBX-9: Probability (NM) (optional)
     $data[] = null;
     // OBX-10: Nature of Abnormal Test (ID) (optional repeating)
     $data[] = null;
     // OBX-11: Observation Result Status (ID)
     $data[] = null;
     // OBX-12: Effective Date of Reference Range (TS) (optional)
     $data[] = null;
     // OBX-13: User Defined Access Checks (ST) (optional)
     $data[] = null;
     // OBX-14: Date/Time of the Observation (TS) (optional)
     $data[] = null;
     // OBX-15: Producer's ID (CE) (optional)
     $data[] = null;
     // OBX-16: Responsible Observer (XCN) (optional repeating)
     $data[] = null;
     // OBX-17: Observation Method (CE) (optional repeating)
     $data[] = null;
     // OBX-18: Equipment Instance Identifier (EI) (optional repeating)
     $data[] = null;
     // OBX-19: Date/Time of the Analysis (TS) (optional)
     $data[] = null;
     $this->fill($data);
 }
Пример #29
0
 /**
  * Build MFE segement
  *
  * @param CHL7v2Event $event Event
  *
  * @return null
  */
 function build(CHL7v2Event $event)
 {
     parent::build($event);
     $entity = $this->entity;
     $primary_key = array_search(get_class($entity), CHL7v2EventMFN::$entities);
     $primary_key = $primary_key . $entity->_id;
     $data = array();
     // MFE-1: Record-Level Event Code - MFE (ID) (Requis)
     $data[] = "MAD";
     // MFE-2: MFN Control ID - MFE (ST) (Conditional)
     $data[] = $event->_exchange_hl7v2->_id;
     // MFE-3: Effective Date/Time - MFE (TS) (Optional)
     $data[] = null;
     // MFE-4: Primary Key Value - MFE - MFE (PL) (Requis)
     $data[] = $primary_key;
     // MFE-5: Primary Key Value Type - MFE (ID) (Requis)
     $data[] = "PL";
     $this->fill($data);
 }
Пример #30
0
 /**
  * Build ZFV segement
  *
  * @param CHL7v2Event $event Event
  *
  * @return null
  */
 function build(CHL7v2Event $event)
 {
     parent::build($event);
     $sejour = $this->sejour;
     // ZFV-1: Etablissement de provenance (DLD)
     if ($sejour->etablissement_entree_id) {
         $etab_provenance = $sejour->loadRefEtablissementProvenance();
         $data[] = array($etab_provenance->finess);
     } else {
         $data[] = null;
     }
     // ZFV-2: Mode de transport de sortie
     $data[] = null;
     // ZFV-3: Type de préadmission
     $data[] = null;
     // ZFV-4: Date de début de placement (psy)
     $data[] = null;
     // ZFV-5: Date de fin de placement (psy)
     $data[] = null;
     // ZFV-6: Adresse de la provenance ou de la destination (XAD)
     $adresses = array();
     if ($sejour->etablissement_entree_id) {
         $adresses[] = array(str_replace("\n", "", $etab_provenance->adresse), null, $etab_provenance->ville, null, $etab_provenance->cp, null, "ORI");
     }
     if ($sejour->etablissement_sortie_id) {
         $etab_destination = $sejour->loadRefEtablissementTransfert();
         $adresses[] = array(str_replace("\n", "", $etab_destination->adresse), null, $etab_destination->ville, null, $etab_destination->cp, null, "DST");
     }
     $data[] = $adresses;
     // ZFV-7: NDA de l'établissement de provenance
     $data[] = null;
     // ZFV-8: Numéros d'archives
     $data[] = null;
     // ZFV-9: Mode de sortie personnalisée
     $data[] = CAppUI::conf("dPplanningOp CSejour use_custom_mode_sortie") ? $sejour->loadRefModeSortie()->code : null;
     $this->fill($data);
 }