PHP 클래스 Patient

상속: extends Object
파일 보기 프로젝트 열기: openeyes/openeyes 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$use_pas

보호된 프로퍼티들

프로퍼티 타입 설명
$_clinical_warnings storage of warning data
$_nonclinical_warnings

공개 메소드들

메소드 설명
__get ( string $prop ) : mixed | null I think this override is here to enforce the override of the medications relation and merge in the prescription items as appropriate.
__isset ( string $prop ) : boolean I think this override is here to enforce the override of the medications relation and merge in the prescription items as appropriate.
addAllergy ( Allergy $allergy, string $other = null, $comments = null, $startTransaction = true ) adds an allergy to the patient.
addDiagnosis ( $disorder_id, $eye_id = false, $date = false )
addEpisode ( $firm ) : Episode add an episode to the patient for the given Firm.
addFamilyHistory ( $relative_id, $other_relative, $side_id, $condition_id, $other_condition, $comments ) Adds FamilyHistory entry to the patient if it's not a duplicate.
addPreviousOperation ( $operation, $side_id, $date )
addRisk ( Risk $risk, string $other = null, $comments = null ) adds a risk to the patient.
ageOn ( string $check_date ) : string Calculate the patient's age.
attributeLabels ( ) : array
audit ( $target, $action, $data = null, $log = false, $properties = [] )
beforeSave ( )
beforeValidate ( )
behaviors ( )
cmp ( $a, $b ) sort the remainder
currentContactIDS ( )
editOphInfo ( PatientOphInfoCviStatus $cvi_status, string $cvi_status_date ) : true | array update the patient's ophthalmic information.
getAge ( ) : string Get the patient's age.
getAllDisorders ( $eye_id = null ) * returns all disorders for the patient.
getAllergiesString ( ) : string returns a standard allergy string for the patient.
getBecomesAdultDate ( ) : null | string Returns the date on which the patient will become an adult.
getCataractEpisodeId ( ) : mixed Get the episode ID of the patient's cataract if it exists.
getChildPrefix ( )
getCommissioningBodyOfType ( CommissioningBodyType $type ) : CommissioningBody get the CommissioningBody of the CommissioningBodyType $type currently assumes there would only ever be one commissioning body of a given type.
getContactAddress ( $contact_id, $location_type = false, $location_id = false )
getCorrespondenceName ( ) : string
getDiabetes ( ) : Disorder | null Get the patient diabetes type as Disorder instance - will return generic Diabetes if no specific type available, but patient has diabetes.
getDiabetesType ( ) : Disorder | null Get the Diabetes Type as a Disorder instance.
getDisordersOfType ( int[] $snomeds ) : Disorder[] get the patient disorders that are of the type in the list of disorder ids provided.
getDisplayName ( )
getDistinctCommissioningBodiesByType ( ) : array[string][CommissioningBody] get an associative array of CommissioningBody for this patient and the patient's practice indexed by CommissioningBodyType id.
getDmt ( ) : string Diabetes mellitus as a letter string.
getEdl ( )
getEdr ( )
getEmail ( ) : mixed Returns the contact address email
getEpc ( )
getEpd ( )
getEpisodeForCurrentSubspecialty ( ) : Episode Get the episode for the subspecialty of the firm (or no subspecialty when the firm doesn't have one).
getEps ( )
getEpv ( )
getEthnicGroupString ( )
getFirst_name ( )
getFullName ( ) : string
getGenderString ( )
getHSCICName ( $bold = false ) : string get the Patient name according to HSCIC guidelines.
getLast_name ( )
getLatestEvent ( )
getLatestOperationNoteEventUniqueCode ( )
getNhsnum ( )
getNick_name ( )
getObj ( )
getOpenEpisodeOfSubspecialty ( $subspecialty_id ) : CActiveRecord | null return the open episode of the given subspecialty if there is one, null otherwise.
getOphInfo ( ) : PatientOphInfo returns the ophthalmic information object for this patient (creates a default one if one does not exist - but does not save it).
getOphthalmicDiagnoses ( )
getOrCreateEpisodeForFirm ( $firm, boolean $include_closed = false ) : CActiveRecord | Episode | null Get or create an episode for the patient under the given Firm (Note that an episode will be returned if there is match on Firm Subspecialty rather than on Firm).
getOrderedEpisodes ( ) * will group episodes by specialty, ordered by the configuration key of specialty sort, and alphanumeric for any specialties not configured.
getPos ( )
getPrefix ( )
getPrimary_phone ( )
getPro ( )
getRisksString ( ) : string returns a standard risk string for the patient.
getSalutationName ( ) : string
getSdl ( )
getSpecialtyCodes ( ) * returns the specialty codes that are relevant to the patient. Determined by looking at the diagnoses related to the patient.
getSub ( )
getSummaryAddress ( $delimiter = '<br/>' )
getSyd ( ) : string Systemic diagnoses shortcode.
getSystemicDiagnoses ( )
getTitle ( )
getUniqueCodeForEvent ( $id )
getWarnings ( boolean $clinical = true ) : {'short_msg' return the patient warnings that have been defined for the patient. If $clinical is false only non-clinical warnings will be returned.
get_medications ( ) : array Gets the current medications linked with items from the prescription events.
get_previous_medications ( ) : array Gets the previous medications linked with items from the prescription events.
hasAllergy ( $allergy ) : boolean returns true if the patient has the allergy passed in.
hasAllergyStatus ( ) : boolean returns true if the allergy status of the patient is known (has allergies, or no known allergies) false otherwise.
hasDisorderTypeByIds ( $snomeds ) * checks if the patient has a disorder that is defined as being within the SNOMED tree specified by the given $snomed id.
hasDrugAllergy ( integer $drug_id = null ) : boolean
hasLegacyLetters ( )
hasOpenEpisodeOfSubspecialty ( $subspecialty_id ) : boolean returns true if patient has an open episode for the given subspecialty id.
hasRisk ( $riskCompare ) : boolean Check if the patient has a given risk.
hasRiskStatus ( ) : boolean returns true if the risk status of the patient is known (has risks, or no known risks) false otherwise.
isChild ( string $check_date = null ) : boolean
isDeceased ( ) : boolean
model ( $className = __CLASS__ ) : Patient Returns the static model of the specified AR class.
noPas ( ) : Patient Suppress PAS integration.
patientMedications ( $medicationCriteria ) : array
prescriptionItems ( array $exclude ) : array | CActiveRecord[] | null
prescriptionMedicationIds ( ) : mixed
relations ( ) : array
removeDiagnosis ( $diagnosis_id )
rules ( ) : array
search ( array $params = [] ) : CActiveDataProvider Retrieves a list of models based on the current search/filter conditions.
search_nr ( $params )
setNoAllergies ( ) marks the patient as having no allergies as of now.
setNoFamilyHistory ( ) marks the patient as having no family history.
setNoRisks ( ) marks the patient as having no allergies as of now.
tableName ( ) : string
validateDeceased ( $attribute, $params )

보호된 메소드들

메소드 설명
afterFind ( ) Raise event to allow external data sources to update patient.
instantiate ( $attributes ) Pass through use_pas flag to allow pas supression.
mergeItemToMedications ( $medicationList, $prescription ) : mixed
sortMedications ( $item1, $item2 ) : boolean Sort the medications by start date.

비공개 메소드들

메소드 설명
getAllDisorderIds ( $eye_id = null ) * returns all disorder ids for the patient, aggregating the principal diagnosis for each patient episode, and any secondary diagnosis on the patient
randomData ( $field )
randomDate ( $startDate = '1931-01-01', $endDate = '2010-12-12' )

메소드 상세

__get() 공개 메소드

I think this override is here to enforce the override of the medications relation and merge in the prescription items as appropriate.
public __get ( string $prop ) : mixed | null
$prop string
리턴 mixed | null

__isset() 공개 메소드

I think this override is here to enforce the override of the medications relation and merge in the prescription items as appropriate.
public __isset ( string $prop ) : boolean
$prop string
리턴 boolean

addAllergy() 공개 메소드

adds an allergy to the patient.
public addAllergy ( Allergy $allergy, string $other = null, $comments = null, $startTransaction = true )
$allergy Allergy
$other string

addDiagnosis() 공개 메소드

public addDiagnosis ( $disorder_id, $eye_id = false, $date = false )

addEpisode() 공개 메소드

add an episode to the patient for the given Firm.
public addEpisode ( $firm ) : Episode
$firm
리턴 Episode

addFamilyHistory() 공개 메소드

Adds FamilyHistory entry to the patient if it's not a duplicate.
public addFamilyHistory ( $relative_id, $other_relative, $side_id, $condition_id, $other_condition, $comments )
$relative_id
$other_relative
$side_id
$condition_id
$other_condition
$comments

addPreviousOperation() 공개 메소드

public addPreviousOperation ( $operation, $side_id, $date )

addRisk() 공개 메소드

adds a risk to the patient.
public addRisk ( Risk $risk, string $other = null, $comments = null )
$risk Risk
$other string

afterFind() 보호된 메소드

Raise event to allow external data sources to update patient.
또한 보기: CActiveRecord::afterFind()
protected afterFind ( )

ageOn() 공개 메소드

Calculate the patient's age.
public ageOn ( string $check_date ) : string
$check_date string Date to check age on (default is today)
리턴 string

attributeLabels() 공개 메소드

public attributeLabels ( ) : array
리턴 array customized attribute labels (name=>label)

audit() 공개 메소드

public audit ( $target, $action, $data = null, $log = false, $properties = [] )

beforeSave() 공개 메소드

public beforeSave ( )

beforeValidate() 공개 메소드

public beforeValidate ( )

behaviors() 공개 메소드

public behaviors ( )

cmp() 공개 메소드

sort the remainder
public cmp ( $a, $b )

currentContactIDS() 공개 메소드

public currentContactIDS ( )

editOphInfo() 공개 메소드

update the patient's ophthalmic information.
public editOphInfo ( PatientOphInfoCviStatus $cvi_status, string $cvi_status_date ) : true | array
$cvi_status PatientOphInfoCviStatus
$cvi_status_date string - fuzzy date string of the format yyyy-mm-dd
리턴 true | array True or array of errors

getAge() 공개 메소드

Get the patient's age.
public getAge ( ) : string
리턴 string

getAllDisorders() 공개 메소드

FIXME: some of this can be abstracted to a relation when we upgrade from yii 1.1.8, which has some problems with yii relations: http://www.yiiframework.com/forum/index.php/topic/26806-relations-through-problem-wrong-on-clause-in-sql-generated/
public getAllDisorders ( $eye_id = null )

getAllergiesString() 공개 메소드

returns a standard allergy string for the patient.
public getAllergiesString ( ) : string
리턴 string

getBecomesAdultDate() 공개 메소드

Returns the date on which the patient will become an adult.
public getBecomesAdultDate ( ) : null | string
리턴 null | string

getCataractEpisodeId() 공개 메소드

Get the episode ID of the patient's cataract if it exists.
public getCataractEpisodeId ( ) : mixed
리턴 mixed

getChildPrefix() 공개 메소드

public getChildPrefix ( )

getCommissioningBodyOfType() 공개 메소드

get the CommissioningBody of the CommissioningBodyType $type currently assumes there would only ever be one commissioning body of a given type.
public getCommissioningBodyOfType ( CommissioningBodyType $type ) : CommissioningBody
$type CommissioningBodyType
리턴 CommissioningBody

getContactAddress() 공개 메소드

public getContactAddress ( $contact_id, $location_type = false, $location_id = false )

getCorrespondenceName() 공개 메소드

public getCorrespondenceName ( ) : string
리턴 string Patient name for prefixing an address

getDiabetes() 공개 메소드

Get the patient diabetes type as Disorder instance - will return generic Diabetes if no specific type available, but patient has diabetes.
public getDiabetes ( ) : Disorder | null
리턴 Disorder | null

getDiabetesType() 공개 메소드

Get the Diabetes Type as a Disorder instance.
public getDiabetesType ( ) : Disorder | null
리턴 Disorder | null

getDisordersOfType() 공개 메소드

get the patient disorders that are of the type in the list of disorder ids provided.
public getDisordersOfType ( int[] $snomeds ) : Disorder[]
$snomeds int[] - disorder ids to check for
리턴 Disorder[]

getDisplayName() 공개 메소드

public getDisplayName ( )

getDistinctCommissioningBodiesByType() 공개 메소드

get an associative array of CommissioningBody for this patient and the patient's practice indexed by CommissioningBodyType id.
public getDistinctCommissioningBodiesByType ( ) : array[string][CommissioningBody]
리턴 array[string][CommissioningBody]

getDmt() 공개 메소드

Diabetes mellitus as a letter string.
public getDmt ( ) : string
리턴 string

getEdl() 공개 메소드

public getEdl ( )

getEdr() 공개 메소드

public getEdr ( )

getEmail() 공개 메소드

Returns the contact address email
public getEmail ( ) : mixed
리턴 mixed

getEpc() 공개 메소드

public getEpc ( )

getEpd() 공개 메소드

public getEpd ( )

getEpisodeForCurrentSubspecialty() 공개 메소드

Get the episode for the subspecialty of the firm (or no subspecialty when the firm doesn't have one).
public getEpisodeForCurrentSubspecialty ( ) : Episode
리턴 Episode

getEps() 공개 메소드

public getEps ( )

getEpv() 공개 메소드

public getEpv ( )

getEthnicGroupString() 공개 메소드

getFirst_name() 공개 메소드

public getFirst_name ( )

getFullName() 공개 메소드

public getFullName ( ) : string
리턴 string Full name

getGenderString() 공개 메소드

public getGenderString ( )

getHSCICName() 공개 메소드

get the Patient name according to HSCIC guidelines.
public getHSCICName ( $bold = false ) : string
리턴 string

getLast_name() 공개 메소드

public getLast_name ( )

getLatestEvent() 공개 메소드

public getLatestEvent ( )

getLatestOperationNoteEventUniqueCode() 공개 메소드

getNhsnum() 공개 메소드

public getNhsnum ( )

getNick_name() 공개 메소드

public getNick_name ( )

getObj() 공개 메소드

public getObj ( )

getOpenEpisodeOfSubspecialty() 공개 메소드

return the open episode of the given subspecialty if there is one, null otherwise.
public getOpenEpisodeOfSubspecialty ( $subspecialty_id ) : CActiveRecord | null
$subspecialty_id
리턴 CActiveRecord | null

getOphInfo() 공개 메소드

returns the ophthalmic information object for this patient (creates a default one if one does not exist - but does not save it).
public getOphInfo ( ) : PatientOphInfo
리턴 PatientOphInfo

getOphthalmicDiagnoses() 공개 메소드

getOrCreateEpisodeForFirm() 공개 메소드

Get or create an episode for the patient under the given Firm (Note that an episode will be returned if there is match on Firm Subspecialty rather than on Firm).
public getOrCreateEpisodeForFirm ( $firm, boolean $include_closed = false ) : CActiveRecord | Episode | null
$firm
$include_closed boolean
리턴 CActiveRecord | Episode | null

getOrderedEpisodes() 공개 메소드

* will group episodes by specialty, ordered by the configuration key of specialty sort, and alphanumeric for any specialties not configured.
public getOrderedEpisodes ( )

getPos() 공개 메소드

public getPos ( )

getPrefix() 공개 메소드

public getPrefix ( )

getPrimary_phone() 공개 메소드

public getPrimary_phone ( )

getPro() 공개 메소드

public getPro ( )

getRisksString() 공개 메소드

returns a standard risk string for the patient.
public getRisksString ( ) : string
리턴 string

getSalutationName() 공개 메소드

public getSalutationName ( ) : string
리턴 string Patient name for using as a salutation

getSdl() 공개 메소드

public getSdl ( )

getSpecialtyCodes() 공개 메소드

* returns the specialty codes that are relevant to the patient. Determined by looking at the diagnoses related to the patient.
public getSpecialtyCodes ( )

getSub() 공개 메소드

public getSub ( )

getSummaryAddress() 공개 메소드

public getSummaryAddress ( $delimiter = '<br/>' )

getSyd() 공개 메소드

Systemic diagnoses shortcode.
public getSyd ( ) : string
리턴 string

getSystemicDiagnoses() 공개 메소드

getTitle() 공개 메소드

public getTitle ( )

getUniqueCodeForEvent() 공개 메소드

public getUniqueCodeForEvent ( $id )

getWarnings() 공개 메소드

return the patient warnings that have been defined for the patient. If $clinical is false only non-clinical warnings will be returned.
public getWarnings ( boolean $clinical = true ) : {'short_msg'
$clinical boolean
리턴 {'short_msg'

get_medications() 공개 메소드

Gets the current medications linked with items from the prescription events.
public get_medications ( ) : array
리턴 array

get_previous_medications() 공개 메소드

Gets the previous medications linked with items from the prescription events.
public get_previous_medications ( ) : array
리턴 array

hasAllergy() 공개 메소드

returns true if the patient has the allergy passed in.
public hasAllergy ( $allergy ) : boolean
$allergy
리턴 boolean

hasAllergyStatus() 공개 메소드

returns true if the allergy status of the patient is known (has allergies, or no known allergies) false otherwise.
public hasAllergyStatus ( ) : boolean
리턴 boolean

hasDisorderTypeByIds() 공개 메소드

* checks if the patient has a disorder that is defined as being within the SNOMED tree specified by the given $snomed id.
public hasDisorderTypeByIds ( $snomeds )

hasDrugAllergy() 공개 메소드

public hasDrugAllergy ( integer $drug_id = null ) : boolean
$drug_id integer
리턴 boolean Is patient allergic?

hasLegacyLetters() 공개 메소드

public hasLegacyLetters ( )

hasOpenEpisodeOfSubspecialty() 공개 메소드

returns true if patient has an open episode for the given subspecialty id.
public hasOpenEpisodeOfSubspecialty ( $subspecialty_id ) : boolean
$subspecialty_id
리턴 boolean

hasRisk() 공개 메소드

Check if the patient has a given risk.
public hasRisk ( $riskCompare ) : boolean
$riskCompare
리턴 boolean

hasRiskStatus() 공개 메소드

returns true if the risk status of the patient is known (has risks, or no known risks) false otherwise.
public hasRiskStatus ( ) : boolean
리턴 boolean

instantiate() 보호된 메소드

Pass through use_pas flag to allow pas supression.
또한 보기: CActiveRecord::instantiate()
protected instantiate ( $attributes )

isChild() 공개 메소드

public isChild ( string $check_date = null ) : boolean
$check_date string Optional date to check age on (default is today)
리턴 boolean Is patient a child?

isDeceased() 공개 메소드

public isDeceased ( ) : boolean
리턴 boolean Is patient deceased?

mergeItemToMedications() 보호된 메소드

protected mergeItemToMedications ( $medicationList, $prescription ) : mixed
$medicationList
$prescription
리턴 mixed

model() 공개 정적인 메소드

Returns the static model of the specified AR class.
public static model ( $className = __CLASS__ ) : Patient
리턴 Patient the static model class

noPas() 공개 메소드

Suppress PAS integration.
public noPas ( ) : Patient
리턴 Patient

patientMedications() 공개 메소드

public patientMedications ( $medicationCriteria ) : array
$medicationCriteria
리턴 array

prescriptionItems() 공개 메소드

public prescriptionItems ( array $exclude ) : array | CActiveRecord[] | null
$exclude array
리턴 array | CActiveRecord[] | null

prescriptionMedicationIds() 공개 메소드

public prescriptionMedicationIds ( ) : mixed
리턴 mixed

relations() 공개 메소드

public relations ( ) : array
리턴 array relational rules.

removeDiagnosis() 공개 메소드

public removeDiagnosis ( $diagnosis_id )

rules() 공개 메소드

public rules ( ) : array
리턴 array validation rules for model attributes.

search_nr() 공개 메소드

public search_nr ( $params )

setNoAllergies() 공개 메소드

marks the patient as having no allergies as of now.
public setNoAllergies ( )

setNoFamilyHistory() 공개 메소드

marks the patient as having no family history.
public setNoFamilyHistory ( )

setNoRisks() 공개 메소드

marks the patient as having no allergies as of now.
public setNoRisks ( )

sortMedications() 보호된 메소드

Sort the medications by start date.
protected sortMedications ( $item1, $item2 ) : boolean
$item1
$item2
리턴 boolean

tableName() 공개 메소드

public tableName ( ) : string
리턴 string the associated database table name

validateDeceased() 공개 메소드

public validateDeceased ( $attribute, $params )

프로퍼티 상세

$_clinical_warnings 보호되어 있는 프로퍼티

storage of warning data
protected $_clinical_warnings

$_nonclinical_warnings 보호되어 있는 프로퍼티

protected $_nonclinical_warnings

$use_pas 공개적으로 프로퍼티

public $use_pas