PHP 클래스 PatientMerge

(C) Moorfields Eye Hospital NHS Foundation Trust, 2008-2011 (C) OpenEyes Foundation, 2011-2013 This file is part of OpenEyes. OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenEyes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenEyes in a file titled COPYING. If not, see .
저자: OpenEyes ([email protected])
파일 보기 프로젝트 열기: openeyes/openeyes 1 사용 예제들

공개 메소드들

메소드 설명
addLog ( string $msg ) Adding message to the log array.
comparePatientDetails ( Patient $primary, Patient $secondary ) : array Compare data in the patient table.
getLog ( ) : type Returns the log messages.
getPrimaryPatient ( ) : Patient Returns the Primary patient.
getSecondaryPatient ( ) : Patient Returns the secondary patient.
load ( PatientMergeRequest $request ) Load data from PatientMergeRequest AR record.
merge ( ) : boolean Do the actual merging by calling separated functions to move episodes, events etc.
setPrimaryPatientById ( integer $id ) Set primary patient by id.
setSecondaryPatientById ( integer $id ) Set secondaty patient by id.
updateAllergyAssignments ( $primaryPatient, $secondaryPatient ) Updates the patient id in the Allergy Assigment.
updateEpisodes ( Patient $primaryPatient, Patient $secondaryPatient ) : boolean Updating an episode - if primary has no episodes than we just assign the secondary patient's episodes to the primary - if secondary patient has no episodes we have nothing to do here - if both patiens have episode we have to check if there is any conflicting(same subspeicaly like cataract or glaucoma) episodes - we move the non conflictong episodes from secondary to primary - when two episodes are conflicting we move the events from the secondary patient's episode to the primary patient's episode then delete the secondary empty episode.
updateEpisodesPatientId ( $newPatientId, $episodes ) : boolean Assign episodes to a new paient id.
updateEventsEpisodeId ( integer $newEpisodeId, array $events ) : boolean Moving event from one episode to another.
updateLegacyEpisodes ( type $primaryPatient, type $secondaryPatient ) : boolean Moving Legacy episode from secondary patient to primary.
updateOphthalmicDiagnoses ( Patient $newPatient, type $ophthalmicDiagnoses ) Updates the Ophthalmic Diagnoses' patient_id
updatePreviousOperations ( Patient $newPatient, type $previousOperations ) : boolean Moving previous operations from secondaty patient to primary.
updateRiskAssignments ( integer $newPatientId, $riskAssignments ) Updates patient id in Risk Assignment.
updateSystemicDiagnoses ( Patient $newPatient, type $systemicDiagnoses ) : boolean Update Systemati Diagnoses' patient id

메소드 상세

addLog() 공개 메소드

Adding message to the log array.
public addLog ( string $msg )
$msg string

comparePatientDetails() 공개 메소드

Compare data in the patient table.
public comparePatientDetails ( Patient $primary, Patient $secondary ) : array
$primary Patient
$secondary Patient
리턴 array

getLog() 공개 메소드

Returns the log messages.
public getLog ( ) : type
리턴 type

getPrimaryPatient() 공개 메소드

Returns the Primary patient.
public getPrimaryPatient ( ) : Patient
리턴 Patient AR record

getSecondaryPatient() 공개 메소드

Returns the secondary patient.
public getSecondaryPatient ( ) : Patient
리턴 Patient AR record

load() 공개 메소드

Load data from PatientMergeRequest AR record.
public load ( PatientMergeRequest $request )
$request PatientMergeRequest

merge() 공개 메소드

..
public merge ( ) : boolean
리턴 boolean $isMerged success or fail

setPrimaryPatientById() 공개 메소드

Set primary patient by id.

setSecondaryPatientById() 공개 메소드

Set secondaty patient by id.

updateAllergyAssignments() 공개 메소드

Updates the patient id in the Allergy Assigment.
public updateAllergyAssignments ( $primaryPatient, $secondaryPatient )

updateEpisodes() 공개 메소드

Updating an episode - if primary has no episodes than we just assign the secondary patient's episodes to the primary - if secondary patient has no episodes we have nothing to do here - if both patiens have episode we have to check if there is any conflicting(same subspeicaly like cataract or glaucoma) episodes - we move the non conflictong episodes from secondary to primary - when two episodes are conflicting we move the events from the secondary patient's episode to the primary patient's episode then delete the secondary empty episode.
public updateEpisodes ( Patient $primaryPatient, Patient $secondaryPatient ) : boolean
$primaryPatient Patient
$secondaryPatient Patient
리턴 boolean

updateEpisodesPatientId() 공개 메소드

Assign episodes to a new paient id.
public updateEpisodesPatientId ( $newPatientId, $episodes ) : boolean
리턴 boolean true if no error thrown

updateEventsEpisodeId() 공개 메소드

Moving event from one episode to another.
public updateEventsEpisodeId ( integer $newEpisodeId, array $events ) : boolean
$newEpisodeId integer
$events array
리턴 boolean

updateLegacyEpisodes() 공개 메소드

Moving Legacy episode from secondary patient to primary.
public updateLegacyEpisodes ( type $primaryPatient, type $secondaryPatient ) : boolean
$primaryPatient type
$secondaryPatient type
리턴 boolean

updateOphthalmicDiagnoses() 공개 메소드

Updates the Ophthalmic Diagnoses' patient_id
public updateOphthalmicDiagnoses ( Patient $newPatient, type $ophthalmicDiagnoses )
$newPatient Patient
$ophthalmicDiagnoses type

updatePreviousOperations() 공개 메소드

Moving previous operations from secondaty patient to primary.
public updatePreviousOperations ( Patient $newPatient, type $previousOperations ) : boolean
$newPatient Patient
$previousOperations type
리턴 boolean

updateRiskAssignments() 공개 메소드

Updates patient id in Risk Assignment.
public updateRiskAssignments ( integer $newPatientId, $riskAssignments )
$newPatientId integer

updateSystemicDiagnoses() 공개 메소드

Update Systemati Diagnoses' patient id
public updateSystemicDiagnoses ( Patient $newPatient, type $systemicDiagnoses ) : boolean
$newPatient Patient
$systemicDiagnoses type
리턴 boolean