VistA Analysis » VistA Reference » RPCs » ORQQCN FIND CONSULT

ORQQCN FIND CONSULT

Given a Consult IEN in file 123, return a formatted list item for thatsingle consult only, in the same format as returned by ORQQCN LIST.

Properties

Property Value
Label FINDCSLT
MUMPS Implementation ORQQCN1
Return Type SINGLE VALUE

Input Parameters

Name Type Maximum Data Length Required Description
GMRCO LITERAL 16 true  

MUMPS Method Description

Property Value
Method FINDCSLT^ORQQCN1
Method Comment Return list item for the selected consult only
Input Parameters GMRCIEN
Code
 N ORPT,X0,GMRCOER,SEQ,SEQ0
Q:+$G(GMRCIEN)=0
S X0=$G(^GMR(123,GMRCIEN,0)) I 'X0 S Y="-1^Consult not found" Q
S ORPT=$P(X0,U,2) I '$G(ORPT) S Y="-1^Patient not found" Q
S GMRCOER=2,SEQ=""
D OER^GMRCSLM1(ORPT,"","","","",GMRCOER)
F S SEQ=$O(^TMP("GMRCR",$J,"CS",SEQ)) Q:SEQ=""!(SEQ?1A.E) I SEQ>0 D
.S SEQ0=^TMP("GMRCR",$J,"CS",SEQ,0) I $P(SEQ0,U,1)=GMRCIEN S Y=SEQ0 Q
K ^TMP("GMRCR",$J)

CPRS

File Type Description
Pascal File Consults/rConsults.pas


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