LR544A ;SLC/JNM - LAB ANATOMIC PATHOLOGY UPDATE ;Apr 05,2021@14:48
;;5.2;LAB SERVICE;**544**;Feb 14, 1996;Build 23
Q
; Integration Agreement - Direct read of ^ORD(101.43 - IA#2835
;
POST ; Post install for LR*5.2*544
N TOTAL S TOTAL=0
D MES("Updating Anatomic Pathology Dialog Definitions..."),MES("")
D SPECS,RENAL,MISC
D MES(""),MES(TOTAL_" Anatomic Pathology Definitions Updated")
Q
;
SPECS ; do specimen updates
N I,STR,OINAME,SPECNAME,IEN,SPEC,FIELD,FLDIEN,BEFORE,AFTER,FIEN,IDX,DONE,FDA,IENS,ADD,TXT
F I=1:1 S STR=$P($T(SPECIMENS+I),";;",2) Q:STR="" D
. I $P(STR,";",1)="NEW" S ADD=1,$P(STR,";",1,2)=$P(STR,";",2)
. E S ADD=0
. S OINAME=$P(STR,";",1),SPECNAME=$P(STR,";",2),FIELD=$P(STR,";",3),BEFORE=$P(STR,";",4),AFTER=$P(STR,";",5)
. S IEN=$O(^ORD(101.43,"B",OINAME,0))
. S SPEC=$O(^LAB(61,"B",SPECNAME,0))
. I (IEN'>0)!(SPEC'>0) Q
. I ADD D Q
.. I $D(^LAB(69.73,IEN,3,SPEC)) Q
.. K FDA,IENS,^TMP("DIERR",$J)
.. S FDA(69.733,"+1,"_IEN_",",.01)=SPECNAME
.. S FDA(69.733,"+1,"_IEN_",",2.1)="TRUE"
.. S FDA(69.733,"+1,"_IEN_",",2.2)="AP SPECIMEN"
.. D UPDATE^DIE("E","FDA","IENS")
.. D REPORT("Added "_OINAME_" "_SPECNAME)
.. I SPEC'=$G(IENS(1)) Q
.. K FDA,IENS,^TMP("DIERR",$J)
.. S FDA(69.7331,"+1,"_SPEC_","_IEN_",",.01)=FIELD
.. S FDA(69.7331,"+1,"_SPEC_","_IEN_",",.04)=BEFORE
.. D UPDATE^DIE("E","FDA","IENS")
.. D REPORT("Added "_OINAME_" "_SPECNAME_" "_FIELD)
.. S FIEN=$G(IENS(1)) Q:'FIEN
.. K FDA,IENS,^TMP("DIERR",$J)
.. S FDA(69.73311,"+1,"_FIEN_","_SPEC_","_IEN_",",.01)=BEFORE
.. D UPDATE^DIE("","FDA","IENS")
.. D REPORT("Added "_OINAME_" "_SPECNAME_" "_FIELD_" "_BEFORE)
. I '$D(^LAB(69.73,IEN,3,SPEC,1)) Q
. S (DONE,FIEN)=0 F S FIEN=$O(^LAB(69.73,IEN,3,SPEC,1,FIEN)) Q:'FIEN!DONE D
.. I $P($G(^LAB(69.73,IEN,3,SPEC,1,FIEN,0)),U,1)'=FIELD Q
.. S IDX=0 F S IDX=$O(^LAB(69.73,IEN,3,SPEC,1,FIEN,1,IDX)) Q:'IDX!DONE D
... I $P($G(^LAB(69.73,IEN,3,SPEC,1,FIEN,1,IDX,0)),U,1)'=BEFORE Q
... K FDA,^TMP("DIERR",$J)
... S FDA(69.73311,IDX_","_FIEN_","_SPEC_","_IEN_",",.01)=AFTER
... D FILE^DIE("","FDA")
... I AFTER="@" S TXT="Deleted ",AFTER=""
... E S TXT="Updated ",AFTER=" to "_AFTER
... D REPORT(TXT_OINAME_" "_SPECNAME_" "_FIELD_" "_BEFORE_AFTER)
... S DONE=1
Q
;
REPORT(MSG) ; Report Errors
I $D(^TMP("DIERR",$J)) D I 1
. D MES("The following errors occurred trying to")
. I $E(MSG,1,7)="Updated" S $E(MSG,1,7)=" update"
. I $E(MSG,1,5)="Added" S $E(MSG,1,5)=" add"
. I $E(MSG,1,7)="Deleted" S $E(MSG,1,7)=" delete"
. D MES(MSG) K MSG
. D MSG^DIALOG("AE",.MSG)
E S TOTAL=TOTAL+1
D MES(.MSG)
Q
;
MES(STR) ;
N S2,I
I $L(STR)>79 D
. F I=80:-1:1 Q:$E(STR,I,I)=" "
. S S2=$E(STR,I+1,999),STR=$E(STR,1,I-1)
. D MES(STR) S STR=" "_S2 K S2
D MES^XPDUTL(.STR)
Q
;
GETPAGE(STR,IEN,PAGE) ; Get 101.43 IEN from pieve 1 of STR, and Page Ien from 2nd piece of STR
N OINAME,PAGENAME,P,DONE
S PAGE=0,OINAME=$P(STR,U),PAGENAME=$P(STR,U,2)
S IEN=$O(^ORD(101.43,"B",OINAME,0)) ; IA#2835
I IEN D
. S (DONE,P)=0 F S P=$O(^LAB(69.73,IEN,2,P)) Q:('P)!DONE D
.. I $P($G(^LAB(69.73,IEN,2,P,0)),U,2)=PAGENAME S PAGE=P,DONE=1
Q
;
GETBLOCK(BLOCK,IEN,PAGE) ; Find a block IEN within the specified page
N BIEN,DONE
S (DONE,BIEN)=0 F S BIEN=$O(^LAB(69.73,IEN,2,PAGE,1,BIEN)) Q:('BIEN)!DONE D
. I $P($G(^LAB(69.73,IEN,2,PAGE,1,BIEN,0)),U)=BLOCK S DONE=BIEN
Q DONE
;
RENAL ; Update Renal Biopsy
N IEN,PAGE,BLOCK,FDA,IENS,TEST,PAGENAME,BLOCKNAME,VALUE,NEWBLOCKNAME
S TEST="RENAL BIOPSY",PAGENAME="Clinical History"
D GETPAGE(TEST_U_PAGENAME,.IEN,.PAGE)
I ('IEN)!('PAGE) Q
S BLOCKNAME="Special Requests (click all that apply)"
S BLOCK=$$GETBLOCK(BLOCKNAME,IEN,PAGE)
I BLOCK D
. K FDA,^TMP("DIERR",$J)
. S FDA(69.7321,BLOCK_","_PAGE_","_IEN_",",.01)="@"
. D FILE^DIE("","FDA")
. D REPORT("Deleted "_TEST_" "_PAGENAME_" "_BLOCKNAME)
K FDA,IENS,^TMP("DIERR",$J)
S BLOCKNAME="Request Type"
I $$GETBLOCK(BLOCKNAME,IEN,PAGE)=0 D
. S FDA(69.7321,"+1,"_PAGE_","_IEN_",",.01)=BLOCKNAME
. S FDA(69.7321,"+1,"_PAGE_","_IEN_",",.02)="TRUE"
. D UPDATE^DIE("E","FDA","IENS")
. D REPORT("Added "_TEST_" "_PAGENAME_" "_BLOCKNAME)
. S BLOCK=$G(IENS(1)) I BLOCK D
.. K FDA,IENS,^TMP("DIERR",$J)
.. S VALUE="Neoplastic"
.. S FDA(69.73211,"+1,"_BLOCK_","_PAGE_","_IEN_",",.01)=VALUE
.. D UPDATE^DIE("E","FDA","IENS")
.. D REPORT("Added "_TEST_" "_PAGENAME_" "_BLOCKNAME_" "_VALUE)
.. K FDA,IENS,^TMP("DIERR",$J)
.. S VALUE="Medical"
.. S FDA(69.73211,"+1,"_BLOCK_","_PAGE_","_IEN_",",.01)=VALUE
.. D UPDATE^DIE("E","FDA","IENS")
.. D REPORT("Added "_TEST_" "_PAGENAME_" "_BLOCKNAME_" "_VALUE)
S BLOCKNAME="Indication for biopsy"
S BLOCK=$$GETBLOCK(BLOCKNAME,IEN,PAGE)
I BLOCK D
. K FDA,^TMP("DIERR",$J)
. S NEWBLOCKNAME="Indication for Biopsy"
. S FDA(69.7321,BLOCK_","_PAGE_","_IEN_",",.01)=NEWBLOCKNAME
. S FDA(69.7321,BLOCK_","_PAGE_","_IEN_",",.03)="TRUE"
. D FILE^DIE("E","FDA")
. D REPORT("Updated "_TEST_" "_PAGENAME_" "_BLOCKNAME_" to "_NEWBLOCKNAME)
. K FDA,IENS,^TMP("DIERR",$J)
. S VALUE="Renal mass"
. S FDA(69.73211,"+1,"_BLOCK_","_PAGE_","_IEN_",",.01)=VALUE
. D UPDATE^DIE("E","FDA","IENS")
. D REPORT("Added "_TEST_" "_PAGENAME_" "_NEWBLOCKNAME_" "_VALUE)
Q
;
MISC ; Update URINE Collection Type / On Urology,Prostate, Clinical History, change "Increased PSA" to "Elevated PSA"
N IEN,OINAME,IDX,DONE,FDA,PAGE,PAGENAME,BLOCK,DONE,BEFORE,AFTER
S OINAME="URINE"
S IEN=$O(^ORD(101.43,"B",OINAME,0))
I IEN D
. S (IDX,DONE)=0 F S IDX=$O(^LAB(69.73,IEN,1,IDX)) Q:('IDX)!(DONE) D
.. I $P($G(^LAB(69.73,IEN,1,IDX,0)),U,1,2)="OPCTY^1" D
... K FDA,^TMP("DIERR",$J)
... S FDA(69.731,IDX_","_IEN_",",.02)="@"
... D FILE^DIE("","FDA")
... D REPORT("Deleted "_OINAME_" COLLECTION TYPE HIDE property")
... S DONE=1
S OINAME="UROLOGY,PROSTATE",PAGENAME="Clinical History"
D GETPAGE(OINAME_U_PAGENAME,.IEN,.PAGE)
I ('IEN)!('PAGE) Q
S BLOCK=$$GETBLOCK(" ",IEN,PAGE)
I 'BLOCK Q
S BEFORE="Increased PSA",AFTER="Elevated PSA"
S (IDX,DONE)=0 F S IDX=$O(^LAB(69.73,IEN,2,PAGE,1,BLOCK,1,IDX)) Q:'IDX!DONE D
. I $P($G(^LAB(69.73,IEN,2,PAGE,1,BLOCK,1,IDX,0)),U,1)'=BEFORE Q
. K FDA,^TMP("DIERR",$J)
. S FDA(69.73211,IDX_","_BLOCK_","_PAGE_","_IEN_",",.01)=AFTER
. D FILE^DIE("","FDA")
. D REPORT("Updated "_OINAME_" "_PAGENAME_" "_BEFORE_" to "_AFTER)
Q
;
SPECIMENS ;
;;BRONCHIAL BIOPSY;BRONCHUS;Stations;Station 2;Station 2
;;BRONCHIAL BIOPSY;BRONCHUS;Stations;Station 4;Station 4
;;BRONCHIAL BIOPSY;BRONCHUS;Stations;Station 7;Station 7
;;FINE NEEDLE ASPIRATE;THYROID GLAND;Specimen Type;Needle Washing;Aspirate and Fixative
;;GASTROINTESTINAL ENDOSCOPY;APPENDIX;Technique;Hot biopsy;Hot Biopsy
;;GASTROINTESTINAL ENDOSCOPY;LYMPH NODE;Technique;Hot biopsy;Hot Biopsy
;;GYNECOLOGY (PAP SMEAR);CERVICAL CYTOLOGIC MATERIAL;Specimen Type;Slide;@
;;NEW;GYNECOLOGY (PAP SMEAR);VAGINAL-CERVICAL CYTOLOGIC MATERIAL;Specimen Type;Thin Prep/Liquid based
;;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLR544A 7063 printed Dec 13, 2024@02:04:28 Page 2
LR544A ;SLC/JNM - LAB ANATOMIC PATHOLOGY UPDATE ;Apr 05,2021@14:48
+1 ;;5.2;LAB SERVICE;**544**;Feb 14, 1996;Build 23
+2 QUIT
+3 ; Integration Agreement - Direct read of ^ORD(101.43 - IA#2835
+4 ;
POST ; Post install for LR*5.2*544
+1 NEW TOTAL
SET TOTAL=0
+2 DO MES("Updating Anatomic Pathology Dialog Definitions...")
DO MES("")
+3 DO SPECS
DO RENAL
DO MISC
+4 DO MES("")
DO MES(TOTAL_" Anatomic Pathology Definitions Updated")
+5 QUIT
+6 ;
SPECS ; do specimen updates
+1 NEW I,STR,OINAME,SPECNAME,IEN,SPEC,FIELD,FLDIEN,BEFORE,AFTER,FIEN,IDX,DONE,FDA,IENS,ADD,TXT
+2 FOR I=1:1
SET STR=$PIECE($TEXT(SPECIMENS+I),";;",2)
if STR=""
QUIT
Begin DoDot:1
+3 IF $PIECE(STR,";",1)="NEW"
SET ADD=1
SET $PIECE(STR,";",1,2)=$PIECE(STR,";",2)
+4 IF '$TEST
SET ADD=0
+5 SET OINAME=$PIECE(STR,";",1)
SET SPECNAME=$PIECE(STR,";",2)
SET FIELD=$PIECE(STR,";",3)
SET BEFORE=$PIECE(STR,";",4)
SET AFTER=$PIECE(STR,";",5)
+6 SET IEN=$ORDER(^ORD(101.43,"B",OINAME,0))
+7 SET SPEC=$ORDER(^LAB(61,"B",SPECNAME,0))
+8 IF (IEN'>0)!(SPEC'>0)
QUIT
+9 IF ADD
Begin DoDot:2
+10 IF $DATA(^LAB(69.73,IEN,3,SPEC))
QUIT
+11 KILL FDA,IENS,^TMP("DIERR",$JOB)
+12 SET FDA(69.733,"+1,"_IEN_",",.01)=SPECNAME
+13 SET FDA(69.733,"+1,"_IEN_",",2.1)="TRUE"
+14 SET FDA(69.733,"+1,"_IEN_",",2.2)="AP SPECIMEN"
+15 DO UPDATE^DIE("E","FDA","IENS")
+16 DO REPORT("Added "_OINAME_" "_SPECNAME)
+17 IF SPEC'=$GET(IENS(1))
QUIT
+18 KILL FDA,IENS,^TMP("DIERR",$JOB)
+19 SET FDA(69.7331,"+1,"_SPEC_","_IEN_",",.01)=FIELD
+20 SET FDA(69.7331,"+1,"_SPEC_","_IEN_",",.04)=BEFORE
+21 DO UPDATE^DIE("E","FDA","IENS")
+22 DO REPORT("Added "_OINAME_" "_SPECNAME_" "_FIELD)
+23 SET FIEN=$GET(IENS(1))
if 'FIEN
QUIT
+24 KILL FDA,IENS,^TMP("DIERR",$JOB)
+25 SET FDA(69.73311,"+1,"_FIEN_","_SPEC_","_IEN_",",.01)=BEFORE
+26 DO UPDATE^DIE("","FDA","IENS")
+27 DO REPORT("Added "_OINAME_" "_SPECNAME_" "_FIELD_" "_BEFORE)
End DoDot:2
QUIT
+28 IF '$DATA(^LAB(69.73,IEN,3,SPEC,1))
QUIT
+29 SET (DONE,FIEN)=0
FOR
SET FIEN=$ORDER(^LAB(69.73,IEN,3,SPEC,1,FIEN))
if 'FIEN!DONE
QUIT
Begin DoDot:2
+30 IF $PIECE($GET(^LAB(69.73,IEN,3,SPEC,1,FIEN,0)),U,1)'=FIELD
QUIT
+31 SET IDX=0
FOR
SET IDX=$ORDER(^LAB(69.73,IEN,3,SPEC,1,FIEN,1,IDX))
if 'IDX!DONE
QUIT
Begin DoDot:3
+32 IF $PIECE($GET(^LAB(69.73,IEN,3,SPEC,1,FIEN,1,IDX,0)),U,1)'=BEFORE
QUIT
+33 KILL FDA,^TMP("DIERR",$JOB)
+34 SET FDA(69.73311,IDX_","_FIEN_","_SPEC_","_IEN_",",.01)=AFTER
+35 DO FILE^DIE("","FDA")
+36 IF AFTER="@"
SET TXT="Deleted "
SET AFTER=""
+37 IF '$TEST
SET TXT="Updated "
SET AFTER=" to "_AFTER
+38 DO REPORT(TXT_OINAME_" "_SPECNAME_" "_FIELD_" "_BEFORE_AFTER)
+39 SET DONE=1
End DoDot:3
End DoDot:2
End DoDot:1
+40 QUIT
+41 ;
REPORT(MSG) ; Report Errors
+1 IF $DATA(^TMP("DIERR",$JOB))
Begin DoDot:1
+2 DO MES("The following errors occurred trying to")
+3 IF $EXTRACT(MSG,1,7)="Updated"
SET $EXTRACT(MSG,1,7)=" update"
+4 IF $EXTRACT(MSG,1,5)="Added"
SET $EXTRACT(MSG,1,5)=" add"
+5 IF $EXTRACT(MSG,1,7)="Deleted"
SET $EXTRACT(MSG,1,7)=" delete"
+6 DO MES(MSG)
KILL MSG
+7 DO MSG^DIALOG("AE",.MSG)
End DoDot:1
IF 1
+8 IF '$TEST
SET TOTAL=TOTAL+1
+9 DO MES(.MSG)
+10 QUIT
+11 ;
MES(STR) ;
+1 NEW S2,I
+2 IF $LENGTH(STR)>79
Begin DoDot:1
+3 FOR I=80:-1:1
if $EXTRACT(STR,I,I)=" "
QUIT
+4 SET S2=$EXTRACT(STR,I+1,999)
SET STR=$EXTRACT(STR,1,I-1)
+5 DO MES(STR)
SET STR=" "_S2
KILL S2
End DoDot:1
+6 DO MES^XPDUTL(.STR)
+7 QUIT
+8 ;
GETPAGE(STR,IEN,PAGE) ; Get 101.43 IEN from pieve 1 of STR, and Page Ien from 2nd piece of STR
+1 NEW OINAME,PAGENAME,P,DONE
+2 SET PAGE=0
SET OINAME=$PIECE(STR,U)
SET PAGENAME=$PIECE(STR,U,2)
+3 ; IA#2835
SET IEN=$ORDER(^ORD(101.43,"B",OINAME,0))
+4 IF IEN
Begin DoDot:1
+5 SET (DONE,P)=0
FOR
SET P=$ORDER(^LAB(69.73,IEN,2,P))
if ('P)!DONE
QUIT
Begin DoDot:2
+6 IF $PIECE($GET(^LAB(69.73,IEN,2,P,0)),U,2)=PAGENAME
SET PAGE=P
SET DONE=1
End DoDot:2
End DoDot:1
+7 QUIT
+8 ;
GETBLOCK(BLOCK,IEN,PAGE) ; Find a block IEN within the specified page
+1 NEW BIEN,DONE
+2 SET (DONE,BIEN)=0
FOR
SET BIEN=$ORDER(^LAB(69.73,IEN,2,PAGE,1,BIEN))
if ('BIEN)!DONE
QUIT
Begin DoDot:1
+3 IF $PIECE($GET(^LAB(69.73,IEN,2,PAGE,1,BIEN,0)),U)=BLOCK
SET DONE=BIEN
End DoDot:1
+4 QUIT DONE
+5 ;
RENAL ; Update Renal Biopsy
+1 NEW IEN,PAGE,BLOCK,FDA,IENS,TEST,PAGENAME,BLOCKNAME,VALUE,NEWBLOCKNAME
+2 SET TEST="RENAL BIOPSY"
SET PAGENAME="Clinical History"
+3 DO GETPAGE(TEST_U_PAGENAME,.IEN,.PAGE)
+4 IF ('IEN)!('PAGE)
QUIT
+5 SET BLOCKNAME="Special Requests (click all that apply)"
+6 SET BLOCK=$$GETBLOCK(BLOCKNAME,IEN,PAGE)
+7 IF BLOCK
Begin DoDot:1
+8 KILL FDA,^TMP("DIERR",$JOB)
+9 SET FDA(69.7321,BLOCK_","_PAGE_","_IEN_",",.01)="@"
+10 DO FILE^DIE("","FDA")
+11 DO REPORT("Deleted "_TEST_" "_PAGENAME_" "_BLOCKNAME)
End DoDot:1
+12 KILL FDA,IENS,^TMP("DIERR",$JOB)
+13 SET BLOCKNAME="Request Type"
+14 IF $$GETBLOCK(BLOCKNAME,IEN,PAGE)=0
Begin DoDot:1
+15 SET FDA(69.7321,"+1,"_PAGE_","_IEN_",",.01)=BLOCKNAME
+16 SET FDA(69.7321,"+1,"_PAGE_","_IEN_",",.02)="TRUE"
+17 DO UPDATE^DIE("E","FDA","IENS")
+18 DO REPORT("Added "_TEST_" "_PAGENAME_" "_BLOCKNAME)
+19 SET BLOCK=$GET(IENS(1))
IF BLOCK
Begin DoDot:2
+20 KILL FDA,IENS,^TMP("DIERR",$JOB)
+21 SET VALUE="Neoplastic"
+22 SET FDA(69.73211,"+1,"_BLOCK_","_PAGE_","_IEN_",",.01)=VALUE
+23 DO UPDATE^DIE("E","FDA","IENS")
+24 DO REPORT("Added "_TEST_" "_PAGENAME_" "_BLOCKNAME_" "_VALUE)
+25 KILL FDA,IENS,^TMP("DIERR",$JOB)
+26 SET VALUE="Medical"
+27 SET FDA(69.73211,"+1,"_BLOCK_","_PAGE_","_IEN_",",.01)=VALUE
+28 DO UPDATE^DIE("E","FDA","IENS")
+29 DO REPORT("Added "_TEST_" "_PAGENAME_" "_BLOCKNAME_" "_VALUE)
End DoDot:2
End DoDot:1
+30 SET BLOCKNAME="Indication for biopsy"
+31 SET BLOCK=$$GETBLOCK(BLOCKNAME,IEN,PAGE)
+32 IF BLOCK
Begin DoDot:1
+33 KILL FDA,^TMP("DIERR",$JOB)
+34 SET NEWBLOCKNAME="Indication for Biopsy"
+35 SET FDA(69.7321,BLOCK_","_PAGE_","_IEN_",",.01)=NEWBLOCKNAME
+36 SET FDA(69.7321,BLOCK_","_PAGE_","_IEN_",",.03)="TRUE"
+37 DO FILE^DIE("E","FDA")
+38 DO REPORT("Updated "_TEST_" "_PAGENAME_" "_BLOCKNAME_" to "_NEWBLOCKNAME)
+39 KILL FDA,IENS,^TMP("DIERR",$JOB)
+40 SET VALUE="Renal mass"
+41 SET FDA(69.73211,"+1,"_BLOCK_","_PAGE_","_IEN_",",.01)=VALUE
+42 DO UPDATE^DIE("E","FDA","IENS")
+43 DO REPORT("Added "_TEST_" "_PAGENAME_" "_NEWBLOCKNAME_" "_VALUE)
End DoDot:1
+44 QUIT
+45 ;
MISC ; Update URINE Collection Type / On Urology,Prostate, Clinical History, change "Increased PSA" to "Elevated PSA"
+1 NEW IEN,OINAME,IDX,DONE,FDA,PAGE,PAGENAME,BLOCK,DONE,BEFORE,AFTER
+2 SET OINAME="URINE"
+3 SET IEN=$ORDER(^ORD(101.43,"B",OINAME,0))
+4 IF IEN
Begin DoDot:1
+5 SET (IDX,DONE)=0
FOR
SET IDX=$ORDER(^LAB(69.73,IEN,1,IDX))
if ('IDX)!(DONE)
QUIT
Begin DoDot:2
+6 IF $PIECE($GET(^LAB(69.73,IEN,1,IDX,0)),U,1,2)="OPCTY^1"
Begin DoDot:3
+7 KILL FDA,^TMP("DIERR",$JOB)
+8 SET FDA(69.731,IDX_","_IEN_",",.02)="@"
+9 DO FILE^DIE("","FDA")
+10 DO REPORT("Deleted "_OINAME_" COLLECTION TYPE HIDE property")
+11 SET DONE=1
End DoDot:3
End DoDot:2
End DoDot:1
+12 SET OINAME="UROLOGY,PROSTATE"
SET PAGENAME="Clinical History"
+13 DO GETPAGE(OINAME_U_PAGENAME,.IEN,.PAGE)
+14 IF ('IEN)!('PAGE)
QUIT
+15 SET BLOCK=$$GETBLOCK(" ",IEN,PAGE)
+16 IF 'BLOCK
QUIT
+17 SET BEFORE="Increased PSA"
SET AFTER="Elevated PSA"
+18 SET (IDX,DONE)=0
FOR
SET IDX=$ORDER(^LAB(69.73,IEN,2,PAGE,1,BLOCK,1,IDX))
if 'IDX!DONE
QUIT
Begin DoDot:1
+19 IF $PIECE($GET(^LAB(69.73,IEN,2,PAGE,1,BLOCK,1,IDX,0)),U,1)'=BEFORE
QUIT
+20 KILL FDA,^TMP("DIERR",$JOB)
+21 SET FDA(69.73211,IDX_","_BLOCK_","_PAGE_","_IEN_",",.01)=AFTER
+22 DO FILE^DIE("","FDA")
+23 DO REPORT("Updated "_OINAME_" "_PAGENAME_" "_BEFORE_" to "_AFTER)
End DoDot:1
+24 QUIT
+25 ;
SPECIMENS ;
+1 ;;BRONCHIAL BIOPSY;BRONCHUS;Stations;Station 2;Station 2
+2 ;;BRONCHIAL BIOPSY;BRONCHUS;Stations;Station 4;Station 4
+3 ;;BRONCHIAL BIOPSY;BRONCHUS;Stations;Station 7;Station 7
+4 ;;FINE NEEDLE ASPIRATE;THYROID GLAND;Specimen Type;Needle Washing;Aspirate and Fixative
+5 ;;GASTROINTESTINAL ENDOSCOPY;APPENDIX;Technique;Hot biopsy;Hot Biopsy
+6 ;;GASTROINTESTINAL ENDOSCOPY;LYMPH NODE;Technique;Hot biopsy;Hot Biopsy
+7 ;;GYNECOLOGY (PAP SMEAR);CERVICAL CYTOLOGIC MATERIAL;Specimen Type;Slide;@
+8 ;;NEW;GYNECOLOGY (PAP SMEAR);VAGINAL-CERVICAL CYTOLOGIC MATERIAL;Specimen Type;Thin Prep/Liquid based
+9 ;;