/** * Apply a prescription protocol * * @param int $operation_id Operation ID * * @return null|string */ function applyProtocolesPrescription($operation_id = null) { if (!$this->_protocole_prescription_chir_id) { return null; } // Application du protocole de prescription $prescription = new CPrescription(); $prescription->object_class = $this->_class; $prescription->object_id = $this->_id; $prescription->type = "sejour"; if ($msg = $prescription->store()) { return $msg; } /* if ($this->_protocole_prescription_anesth_id) { $prescription->applyPackOrProtocole( $this->_protocole_prescription_anesth_id, $this->praticien_id, CMbDT::date(), null, $operation_id ); } */ if ($this->_protocole_prescription_chir_id) { $prescription->_dhe_mode = true; $prescription->applyPackOrProtocole($this->_protocole_prescription_chir_id, $this->praticien_id, CMbDT::date(), null, $operation_id, null); } return null; }