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

LR7OV1.m

Go to the documentation of this file.
  1. LR7OV1 ;slc/dcm - Update Ordering Parameters ;8/11/97
  1. ;;5.2T9;LR;**1018**;Nov 17, 2004
  1. ;;5.2;LAB SERVICE;**121,187**;Sep 27, 1994
  1. ;
  1. PKG() ;Package level parameters
  1. S X=$O(^DIC(9.4,"B","LAB SERVICE",0))_";DIC(9.4,"
  1. Q X
  1. ;
  1. EN ;Pass Lab parameters to OE/RR
  1. N DATA,IFN,X
  1. S DATA=($P($G(^LAB(69.9,1,5)),"^",4)=1) D MON(DATA)
  1. S DATA=($P($G(^LAB(69.9,1,5)),"^",5)=1) D TUES(DATA)
  1. S DATA=($P($G(^LAB(69.9,1,5)),"^",6)=1) D WED(DATA)
  1. S DATA=($P($G(^LAB(69.9,1,5)),"^",7)=1) D THURS(DATA)
  1. S DATA=($P($G(^LAB(69.9,1,5)),"^",1)=1) D FRI(DATA)
  1. S DATA=($P($G(^LAB(69.9,1,5)),"^",2)=1) D SAT(DATA)
  1. S DATA=($P($G(^LAB(69.9,1,5)),"^",3)=1) D SUN(DATA)
  1. S DATA=$P($G(^LAB(69.9,1,0)),"^",10) D HOL(DATA)
  1. S IFN=0 F S IFN=$O(^LAB(69.9,1,4,IFN)) Q:IFN<1 S X=^(IFN,0) D
  1. . S DATA=$P(X,"^"),DIV=$P(X,"^",4) D COLTIM(DIV,IFN,$P(X,"^",2))
  1. S IFN=0 F S IFN=$O(^LAB(69.9,1,9,IFN)) Q:IFN<1 S X=^(IFN,0) D
  1. . D:$P(X,"^",2) MAXDAY($P(X,"^"),1,$P(X,"^",2))
  1. . D:$P(X,"^",5) URG($P(X,"^"),1,1)
  1. . D:$L($P(X,"^",6)) TYPE($P(X,"^"),1,$P(X,"^",6))
  1. S IFN=0 F S IFN=$O(^LAB(69.9,1,2,IFN)) Q:IFN<1 S X=+^(IFN,0) D
  1. . D:X EXCEPTED(X,1,1)
  1. Q
  1. MON(DATA) ;Collect Monday orders
  1. Q:'$$XPARCK^LR7OV2
  1. N X D PUT^XPAR($$PKG,"LR COLLECT MONDAY",1,DATA)
  1. Q
  1. TUES(DATA) ;Collect Tuesday orders in
  1. Q:'$$XPARCK^LR7OV2
  1. N X D PUT^XPAR($$PKG,"LR COLLECT TUESDAY",1,DATA)
  1. Q
  1. WED(DATA) ;Collect Wednesday order in
  1. Q:'$$XPARCK^LR7OV2
  1. N X D PUT^XPAR($$PKG,"LR COLLECT WEDNESDAY",1,DATA)
  1. Q
  1. THURS(DATA) ;Collect Thursday order in
  1. Q:'$$XPARCK^LR7OV2
  1. N X D PUT^XPAR($$PKG,"LR COLLECT THURSDAY",1,DATA)
  1. Q
  1. FRI(DATA) ;Collect Friday orders in
  1. Q:'$$XPARCK^LR7OV2
  1. N X D PUT^XPAR($$PKG,"LR COLLECT FRIDAY",1,DATA)
  1. Q
  1. SAT(DATA) ;Collect Saturday orders in
  1. Q:'$$XPARCK^LR7OV2
  1. N X D PUT^XPAR($$PKG,"LR COLLECT SATURDAY",1,DATA)
  1. Q
  1. SUN(DATA) ;Collect Sunday orders in
  1. Q:'$$XPARCK^LR7OV2
  1. N X D PUT^XPAR($$PKG,"LR COLLECT SUNDAY",1,DATA)
  1. Q
  1. HOL(DATA) ;Ignore holidays
  1. Q:'$$XPARCK^LR7OV2
  1. N X D PUT^XPAR($$PKG,"LR IGNORE HOLIDAYS",1,DATA)
  1. Q
  1. DIV(DIV) ;Division level parameters
  1. S X=$S(DIV:DIV,$D(DUZ(2)):DUZ(2),1:"")_";DIC(4,"
  1. Q X
  1. COLTIM(DIV,ID,DATA) ;Phlebotomy collection time
  1. Q:'$$XPARCK^LR7OV2
  1. N X
  1. N X D PUT^XPAR($$DIV(DIV),"LR PHLEBOTOMY COLLECTION",ID,DATA)
  1. Q
  1. MAXDAY(LOC,ID,DATA) ;Max days for continuous orders
  1. Q:'$$XPARCK^LR7OV2
  1. N X D PUT^XPAR($$LOC(LOC),"LR MAX DAYS CONTINUOUS",ID,DATA)
  1. Q
  1. LOC(LOC) ;Location level parameters
  1. S X=LOC_";SC("
  1. Q X
  1. ;
  1. EXCEPTED(LOC,ID,DATA) ;Excepted locations
  1. Q:'$$XPARCK^LR7OV2
  1. D PUT^XPAR($$LOC(LOC),"LR EXCEPTED LOCATIONS",ID,DATA)
  1. Q
  1. URG(LOC,ID,DATA) ;Ask Urgency
  1. Q:'$$XPARCK^LR7OV2
  1. N X D PUT^XPAR($$LOC(LOC),"LR ASK URGENCY",ID,DATA)
  1. Q
  1. TYPE(LOC,ID,DATA) ;Default Collection type for quick orders
  1. Q:'$$XPARCK^LR7OV2
  1. N X D PUT^XPAR($$LOC(LOC),"LR DEFAULT TYPE QUICK",ID,DATA)
  1. Q