/** * get single PatientPsy instance from a DOMElement * * @param DOMElement $node * @return PatientPsy */ public static function fromDOMElement(DOMElement $node) { $o = new PatientPsy(); $o->assignByHash(self::domNodeToHash($node, self::$FIELD_NAMES, self::$DEFAULT_VALUES, self::$FIELD_TYPES)); $o->notifyPristine(); return $o; }
/** * Fetch PatientPsy's which this Patient references. * `patient`.`code` -> `patient_psy`.`code` * * @param PDO $db a PDO Database instance * @param array $sort array of DSC instances * @return PatientPsy[] */ public function fetchPatientPsyCollection(PDO $db, $sort = null) { $filter = array(PatientPsy::FIELD_CODE => $this->getCode()); return PatientPsy::findByFilter($db, $filter, true, $sort); }