LRCAPDL ;DALISC/FHS - FORMATE DATA FROM 64.03 FOR DOWN LOAD TO SPREAD SHEET
;;5.2;LAB SERVICE;;Sep 27, 1994
EN ;
D ^%ZISC I '$O(^LRO(64.03,0)) W !?5,"Sorry No data to down load",!! G END
W !!,?20,"THE CHARACTER '^' IS NOT ALLOWED ",!
R !!?10,"WHAT CHARACTER SHOULD BE USED TO SEPARATE THE FIELDS ",LRCH:DTIME
G:'$T!(LRCH="^") END
I '$L(LRCH) W !!?5,$C(7),"YOU MUST SELECT SOME CHARACTER ",!! G EN
W !,"OK",! D ^%ZIS G END:POP U IO(0)
PRT W !,"YOU MAY PRESS RETURN/ENTER KEY TO STOP TRANSMISSION OF DATA ",!
R !!?5,"PRESS RETURN WHEN READY ",X:500 G:'$T END
W ! S (CNT,I)=0 F S I=$O(^LRO(64.03,I)) Q:I="" I $D(^(I,0)) S X=$TR(^(0),"^",LRCH) U IO W X,! S CNT=CNT+1 U IO(0) R LRSTOP:.001 Q:$T
U IO(0) W !,"DOWN LOADED ",CNT," LINES OF DATA ",!!
END ;
D ^%ZISC
W !!?30,"CELL DATA FORMAT ",!
W !,"CELL 1=SEQ NUMBER",?25,"CELL 2=PROVIDER ",?52,"CELL 3=PATIENT"
W !,"CELL 4=DATE COMPLETED",?25,"CELL 5=REPORTING SITE",?52,"CELL 6=LOCATION TYPE"
W !,"CELL 7=ACCESSION AREA",?25,"CELL 8=LAB TEST NAME",?52,"CELL 9=URGENCY"
W !,"CELL 10=TREATING SPEC",?25,"CELL 11=WKLD CODE",?52,"CELL 12=INVERSE DATE"
W !,"CELL 13=DATE COLLECTED",?25,"CELL 14=DATE ORDERED",?52,"CELL 15=HOSPITAL LOCATION"
W !,"CELL 16=ACCESSION FILE INDEX",!
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLRCAPDL 1266 printed Nov 22, 2024@17:22:57 Page 2
LRCAPDL ;DALISC/FHS - FORMATE DATA FROM 64.03 FOR DOWN LOAD TO SPREAD SHEET
+1 ;;5.2;LAB SERVICE;;Sep 27, 1994
EN ;
+1 DO ^%ZISC
IF '$ORDER(^LRO(64.03,0))
WRITE !?5,"Sorry No data to down load",!!
GOTO END
+2 WRITE !!,?20,"THE CHARACTER '^' IS NOT ALLOWED ",!
+3 READ !!?10,"WHAT CHARACTER SHOULD BE USED TO SEPARATE THE FIELDS ",LRCH:DTIME
+4 if '$TEST!(LRCH="^")
GOTO END
+5 IF '$LENGTH(LRCH)
WRITE !!?5,$CHAR(7),"YOU MUST SELECT SOME CHARACTER ",!!
GOTO EN
+6 WRITE !,"OK",!
DO ^%ZIS
if POP
GOTO END
USE IO(0)
PRT WRITE !,"YOU MAY PRESS RETURN/ENTER KEY TO STOP TRANSMISSION OF DATA ",!
+1 READ !!?5,"PRESS RETURN WHEN READY ",X:500
if '$TEST
GOTO END
+2 WRITE !
SET (CNT,I)=0
FOR
SET I=$ORDER(^LRO(64.03,I))
if I=""
QUIT
IF $DATA(^(I,0))
SET X=$TRANSLATE(^(0),"^",LRCH)
USE IO
WRITE X,!
SET CNT=CNT+1
USE IO(0)
READ LRSTOP:.001
if $TEST
QUIT
+3 USE IO(0)
WRITE !,"DOWN LOADED ",CNT," LINES OF DATA ",!!
END ;
+1 DO ^%ZISC
+2 WRITE !!?30,"CELL DATA FORMAT ",!
+3 WRITE !,"CELL 1=SEQ NUMBER",?25,"CELL 2=PROVIDER ",?52,"CELL 3=PATIENT"
+4 WRITE !,"CELL 4=DATE COMPLETED",?25,"CELL 5=REPORTING SITE",?52,"CELL 6=LOCATION TYPE"
+5 WRITE !,"CELL 7=ACCESSION AREA",?25,"CELL 8=LAB TEST NAME",?52,"CELL 9=URGENCY"
+6 WRITE !,"CELL 10=TREATING SPEC",?25,"CELL 11=WKLD CODE",?52,"CELL 12=INVERSE DATE"
+7 WRITE !,"CELL 13=DATE COLLECTED",?25,"CELL 14=DATE ORDERED",?52,"CELL 15=HOSPITAL LOCATION"
+8 WRITE !,"CELL 16=ACCESSION FILE INDEX",!
+9 QUIT