Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: BPCLORD

BPCLORD.m

Go to the documentation of this file.
BPCLORD ; IHS/OIT/MJL - GUI CHART LAB ORDER SCREEN ;
 ;;1.5;BPC;;MAY 26, 2005
 ;LISTS TESTS FOR ORDERING FROM LAB ACCESSION AREA LISTING
 ;LISTS WARDS
GETPICK(RESULT) ;EP REMOTE PROC: BPC GETPICKLIST
 ; Get default pick list from BLR MASTER CONTROL File
 K RESULT S XWBWRAP=1
 I '$D(^BLRSITE("B",DUZ(2))) S RESULT(1)=-1,RESULT(2)="NO PICK LIST Defined In BLR MASTER CONTROL FILE!" Q
 S BPCIEN=$O(^BLRSITE("B",DUZ(2),"")),BPCDTA=^BLRSITE(BPCIEN,11),BPCPICK=$P(BPCDTA,U,5)
 D
 .I BPCPICK="" S RESULT(1)=-1,RESULT(2)="NO PICK LIST Defined In BLR MASTER CONTROL FILE!" Q
 .S DIC="^LAB(62.6,",DIC(0)="X",X=BPCPICK D ^DIC K DIC I Y<1 S RESULT(1)=-1,RESULT(2)=BPCPICK_" NOT defined in ACCESSION TEST GROUP FILE" Q
 .S RESULT(1)=2,RESULT(2)=+Y,RESULT(3)=BPCPICK
 K BPCDTA,BPCIEN,BPCPICK
 Q
 ;
LISTT(RESULT,BPCPARAM) ;;EP REMOTE PROC: BPC ORDERSCREEN
 ;
 K RESULT
 ; RESERVE THE 1ST ELEMENT OF RESULT FOR THE COUNT
 S BPCAG=BPCPARAM,XWBWRAP=1,BPCCTR=1
 S X=0 F  S X=$O(^LAB(62.6,BPCAG,1,X)) Q:'X  S BPCVAL=$G(^LAB(62.6,BPCAG,1,X,0)) I BPCVAL S BPCCTR=BPCCTR+1,RESULT(BPCCTR)="TEST"_U_$P(BPCVAL,U,2)_U_$P(BPCVAL,U,1)_U_$P(BPCVAL,U,4)_U_$P(^LAB(60,$P(BPCVAL,U),0),U,19)
 ;D LOC  ; CALL COMMENTED SINCE IT SEEMED EXTRANEOUS -- MJL
 S RESULT(1)=BPCCTR-1
 K BPCAG,BPCCTR,BPCVAL
 Q
 ;
LOC ;GETS HOSPITAL LOCATION LIST
 S FILE=44,IEN="",FIELDS="1",NUMBER=999,FROM="",TROOT="^BPCTEMP("_$J_")",PARAM=""
 D LISTL
 Q
LISTL ;
 K ^BPCTEMP($J) S DIQUIET=1 S FLAGS="Q",PART="",INDEX="C",SCREEN="",IDENT="",TROOT="^BPCTEMP("_$J_")"
 D LIST^DIC(FILE,IEN,FIELDS,FLAGS,NUMBER,FROM,PART,INDEX,SCREEN,IDENT,TROOT)
 S X=0 F  S X=$O(^BPCTEMP($J,"DILIST","ID",X)) Q:+X=0  D L1 S RESULT(BPCCTR)="LOC"_U_$G(^BPCTEMP($J,"DILIST",2,X))_"^"_$G(F) S BPCCTR=BPCCTR+1
 Q
L1 S F="" F I=1:1 S Y=$P(FIELDS,";",I) Q:'Y  D
 .S F=F_^BPCTEMP($J,"DILIST","ID",X,Y)_"^"
 Q