VistA Analysis » VistA Reference » RPCs » ORQQPL LIST

ORQQPL LIST

Function returns a list of problems for a patient.

Properties

Property Value
Label LIST
MUMPS Implementation ORQQPL
Return Type ARRAY

Input Parameters

Name Type Maximum Data Length Required Description
PATIENT ID LITERAL 16 true The record number of the patient from the Patient FIle (#2).
STATUS LITERAL 2   The status of the problems to retrieve. A = Active problems only, I = Inactive problems only, "" or undefined = all problems regardless ofstatus.

MUMPS Method Description

Property Value
Method LIST^ORQQPL
Method Comment return pt's problem list in format: ien^description^
Input Parameters DFN, STATUS
First Comment
 ICD^onset^last modified^SC^SpExp
STATUS = status of problems to return: (A)CTIVE, (I)NACTIVE, ("")ALL
Code
 Q:'+DFN
N ORGMPL,I,DETAIL,ORIDT,IMPLDT
S IMPLDT=$$IMPDATE^LEXU("10D")
S ORIDT=$S($P(DFN,U,2)]"":$P(DFN,U,2),1:DT)
S:ORIDT'>0 ORIDT=DT
S DFN=+DFN
I $L($T(LIST^GMPLUTL2))>0 D
.D LIST^GMPLUTL2(.ORGMPL,DFN,STATUS)
.Q:'$D(ORGMPL(0))
.S DETAIL=$$DETAIL^ORWCV1(10)
.F I=1:1:ORGMPL(0) D
..N LEX,X
..S X=ORGMPL(I)
..S ORPY(I)=$P(X,U)_U_$P(X,U,3)_U_$P(X,U,2)_U_$P(X,U,4)_U_$P(X,U,5)_U_$P(X,U,6)_U_$P(X,U,7)_U_$P(X,U,8)_U_$P(X,U,10)_U_$P(X,U,9)_U_U_DETAIL_U_U_$P(X,U,11)_U_$P(X,U,12)_U_$P(X,U,13)
..S ORPY(I)=ORPY(I)_U_$S($P(ORPY(I),U,2)?.U1" "1"-"1" ".E:1,1:"")
..I (ORIDT ...S $P(ORPY(I),U,13)="#",$P(ORPY(I),U,9)="#"
..E I $L($P(ORPY(I),U,14)),(+$$STATCHK^LEXSRC2($P(ORPY(I),U,14),ORIDT,.LEX)'=1) S $P(ORPY(I),U,13)="$",$P(ORPY(I),U,9)="#"
.S:+$G(ORPY(1))<1 ORPY(1)="^No problems found."
I $L($T(LIST^GMPLUTL2))<1 S ORPY(1)="^Problem list not available.^"
K X

CPRS

File Type Description
Pascal File rCover.pas


Document generated on August 31st 2022, 2:55:43 pm