VistA Analysis » VistA Reference » RPCs » ORQPT TEAM PATIENTS

ORQPT TEAM PATIENTS

Function returns an array of patients on a team.

Properties

Property Value
Label TEAMPTS
MUMPS Implementation ORQPTQ1
Return Type ARRAY

Input Parameters

Name Type Maximum Data Length Required Description
TEAM ID LITERAL 16 true The record number from the OE/RR Team File (#100.21).

MUMPS Method Description

Property Value
Method TEAMPTS^ORQPTQ1
Method Comment RETURN LIST OF PATIENTS IN A TEAM
Input Parameters TEAM, TMPFLAG
First Comment
 Also called under DBIA # 2692.
If TMPFLAG passed and = TRUE, code expects a "^TMP(xxx"
global root string passed in ORY, and builds the returned
list in that global instead of to a memory array.
Code
 N DOTMP,NEWTMP
S DOTMP=0
I $G(TMPFLAG) D ; Was value passed?
.I TMPFLAG S DOTMP=1 ; Is value TRUE?
I +$G(TEAM)<1 D
.I DOTMP S NEWTMP=ORY_1_")",@NEWTMP="^No team identified" Q
.I 'DOTMP S ORY(1)="^No team identified" Q
N ORI,ORPT,I
S I=0
S ORI=0 F S ORI=$O(^OR(100.21,+TEAM,10,ORI)) Q:ORI<1 D
.S ORPT=^OR(100.21,+TEAM,10,ORI,0)
.I DOTMP D
..S I=I+1,NEWTMP=ORY_+I_")"
..S @NEWTMP=+ORPT_U_$P(^DPT(+ORPT,0),U)
.I 'DOTMP S I=I+1,ORY(I)=+ORPT_U_$P(^DPT(+ORPT,0),U)
I DOTMP S:I<1 NEWTMP=ORY_1_")",@NEWTMP="^No patients found."
I 'DOTMP S:I<1 ORY(1)="^No patients found."

CPRS

File Type Description
Pascal File rCore.pas


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