GMTSRO ; SLC/JER,KER - All Surgery Reports ; 06/24/2002 [8/3/04 2:10pm]
;;2.7;Health Summary;**9,11,28,37,57**;Oct 20, 1995
;
; External References
; DBIA 3590 HS^SROGMTS
;
ENSRO ; Entry Point for Surgery Only Component
S GMTSSO=1
;
ENSR ; Entry Point for SURGERY REPORT component
; (includes NON-OR procedures)
N GMTSMX,GMCOUNT,GMIDT,GMN,SURG,GMTSGL S GMTSGL=$$GL^GMTSROE Q:'$L(GMTSGL) Q:'$D(@(GMTSGL_"""B"","_DFN_")"))
S GMTSMX=999 I $D(GMTSNDM),(GMTSNDM>0) S GMTSMX=GMTSNDM
S GMN=0 F S GMN=$O(@(GMTSGL_"""B"","_DFN_","_GMN_")")) Q:GMN'>0 D SORT
Q:'$D(SURG) S (GMCOUNT,GMIDT)=0 F S GMIDT=$O(SURG(GMIDT)) Q:GMIDT'>0!(GMCOUNT'<GMTSMX) S GMN=SURG(GMIDT) D WRT Q:$D(GMTSQIT)
K GMTSSO Q
;
SORT ; Sort Surgeries by Inverse Date
N GMDT S GMDT=$P($G(@(GMTSGL_GMN_",0)")),U,9) I GMDT>GMTSBEG&(GMDT<GMTSEND) D
. F Q:'$D(SURG(9999999-GMDT)) S GMDT=GMDT+.0001
. S SURG(9999999-GMDT)=GMN
Q
;
WRT ; Write Surgical Case Record
N REC,X,GMI,GMJ,GMDT,GMTSTR
D:+($$PROK^GMTSU("SROGMTS",100))>0 HS^SROGMTS(GMN)
D:+($$PROK^GMTSU("SROGMTS",100))'>0 ONE^GMTSROE(GMN)
NONOP ; Non-Op Procedure
; Quit if Surgery Only
Q:$G(REC(130,GMN,118,"I"))="Y"&(+($G(GMTSSO))>0)
; Print if SR*3*100
;G:+($$PROK^GMTSU("SROGMTS",100))>0 OPER
I $G(REC(130,GMN,118,"I"))'="Y" G OPER
; Print if NOT SR*3*100
I $G(REC(130,GMN,118,"I"))="Y" Q:$G(GMTSSO) D WRT^GMTSRON Q
S GMCOUNT=GMCOUNT+1
OPER ; Operative Procedure
SS ; Date/Specialty/Surgeon
D CKP^GMTSUP Q:$D(GMTSQIT)
S GMDT=$G(REC(130,GMN,.09,"S")) S:'$L(GMDT) GMDT=$$ED^GMTSU($G(REC(130,GMN,.09,"I")))
S GMTSTR=$G(REC(130,GMN,.04,"S")) S:$L($G(GMTSTR))>25 GMTSTR=$$WRAP^GMTSORC(GMTSTR,25)
W $G(GMDT),?21,$P($G(GMTSTR),"|"),?47,"Surgeon:",?56,$G(REC(130,GMN,.14,"E")),!
F GMI=2:1:$L($G(GMTSTR),"|") D CKP^GMTSUP Q:$D(GMTSQIT) W ?23,$P($G(GMTSTR),"|",GMI),!
SPA ; Status/Principal Anesthetist
D CKP^GMTSUP Q:$D(GMTSQIT)
W ?13,"Status:",?21,$G(REC(130,GMN,"STATUS"))
W ?44,"Prin Anest:",?56,$G(REC(130,GMN,.31,"E")),!
PREDX ; Principal Pre-Op Diagnosis
D CKP^GMTSUP Q:$D(GMTSQIT) W ?5,"Pre-op Diag(s):"
S GMTSTR=$G(REC(130,GMN,32,"S")) S:GMTSTR="" GMTSTR=$G(REC(130,GMN,32,"E"))
S:$L(GMTSTR)&($L($G(REC(130,GMN,"VERIFIED")))) GMTSTR=GMTSTR_" "_$G(REC(130,GMN,"VERIFIED")) S:$L(GMTSTR)>58 GMTSTR=$$WRAP^GMTSORC(GMTSTR,58)
F GMJ=1:1:$L(GMTSTR,"|") D Q:$D(GMTSQIT)
. D CKP^GMTSUP Q:$D(GMTSQIT) W ?$S(GMJ=1:21,1:22),$P(GMTSTR,"|",GMJ) W !
Q:$D(GMTSQIT)
OPREDX ; Other Pre-Op Diagnosis
S GMI=0 F S GMI=$O(REC(130,GMN,130.17,GMI)) Q:GMI'>0 D
. S GMTSTR=$G(REC(130,GMN,130.17,GMI,.01,"S")) S:GMTSTR="" GMTSTR=$G(REC(130,GMN,130.17,GMI,.01,"E"))
. S:$L(GMTSTR)&($L($G(REC(130,GMN,"VERIFIED")))) GMTSTR=GMTSTR_" "_$G(REC(130,GMN,"VERIFIED")) S:$L(GMTSTR)>58 GMTSTR=$$WRAP^GMTSORC(GMTSTR,58)
. F GMJ=1:1:$L(GMTSTR,"|") D Q:$D(GMTSQIT)
. . D CKP^GMTSUP Q:$D(GMTSQIT) W ?$S(GMJ=1:21,1:22),$P(GMTSTR,"|",GMJ) W !
Q:$D(GMTSQIT)
PSTDX ; Post-Op Diagnosis
D CKP^GMTSUP Q:$D(GMTSQIT) W ?4,"Post-op Diag(s):"
S GMTSTR=$G(REC(130,GMN,34,"S")) S:GMTSTR="" GMTSTR=$G(REC(130,GMN,34,"E")) S:$L(GMTSTR)>58 GMTSTR=$$WRAP^GMTSORC(GMTSTR,58)
F GMJ=1:1:$L(GMTSTR,"|") D CKP^GMTSUP Q:$D(GMTSQIT) W ?$S(GMJ=1:21,1:22),$P(GMTSTR,"|",GMJ) W:GMJ=1&(GMTSTR?1.A.E) " ",$G(REC(130,GMN,"VERIFIED")) W !
OPSTDX ; Other Post-Op Diagnosis
S GMI=0 F S GMI=$O(REC(130,GMN,130.18,GMI)) Q:GMI'>0 D
. S GMTSTR=$G(REC(130,GMN,130.18,GMI,.01,"S")) S:GMTSTR="" GMTSTR=$G(REC(130,GMN,130.18,GMI,.01,"E")) S:$L(GMTSTR)>58 GMTSTR=$$WRAP^GMTSORC(GMTSTR,58)
. F GMJ=1:1:$L(GMTSTR,"|") D CKP^GMTSUP Q:$D(GMTSQIT) W ?$S(GMJ=1:21,1:22),$P(GMTSTR,"|",GMJ) W:GMJ=1&(GMTSTR?1.A.E) " ",$G(REC(130,GMN,"VERIFIED")) W !
OP ; Operative Procedures
D CKP^GMTSUP Q:$D(GMTSQIT) W ?2,"Operative Proc(s):" S GMTSTR=$G(REC(130,GMN,26,"S")) S:GMTSTR="" GMTSTR=$G(REC(130,GMN,26,"E")) S:$L(GMTSTR)>58 GMTSTR=$$WRAP^GMTSORC(GMTSTR,58)
F GMJ=1:1:$L(GMTSTR,"|") D Q:$D(GMTSQIT)
. D CKP^GMTSUP Q:$D(GMTSQIT) W ?$S(GMJ=1:21,1:22),$P(GMTSTR,"|",GMJ),!
Q:$D(GMTSQIT)
OPM ; Operative Procedures (Modifiers)
S GMI=0 F S GMI=$O(REC(130,GMN,130.028,GMI)) Q:GMI'>0 D Q:$D(GMTSQIT)
. S GMTSTR=$G(REC(130,GMN,130.028,GMI,.01,"S")) S:GMTSTR="" GMTSTR=$G(REC(130,GMN,130.028,GMI,.01,"E")) S:$L(GMTSTR)>54 GMTSTR=$$WRAP^GMTSORC(GMTSTR,54)
. F GMJ=1:1:$L(GMTSTR,"|") D Q:$D(GMTSQIT)
. . D CKP^GMTSUP Q:$D(GMTSQIT) W ?$S(GMJ=1:25,1:26),$P(GMTSTR,"|",GMJ),!
Q:$D(GMTSQIT)
OOP ; Other Procedures
S GMI=0 F S GMI=$O(REC(130,GMN,130.16,GMI)) Q:GMI'>0 D
. S GMTSTR=$G(REC(130,GMN,130.16,GMI,.01,"S")) S:GMTSTR="" GMTSTR=$G(REC(130,GMN,130.16,GMI,.01,"E")) S:$L(GMTSTR)>58 GMTSTR=$$WRAP^GMTSORC(GMTSTR,58)
. F GMJ=1:1:$L(GMTSTR,"|") D Q:$D(GMTSQIT)
. . D CKP^GMTSUP Q:$D(GMTSQIT)
. . W ?$S(GMJ=1:21,1:22),$P(GMTSTR,"|",GMJ),!
OOPM . ; Other Operative Procedures (Modifiers)
. N GMM S GMM=0 F S GMM=$O(REC(130,GMN,130.16,GMI,130.164,GMM)) Q:+GMM=0 D
. . S GMTSTR=$G(REC(130,GMN,130.16,GMI,130.164,GMM,.01,"S")) S:'$L(GMTSTR) GMTSTR=$G(REC(130,GMN,130.16,GMI,130.164,GMM,.01,"E")) S:$L(GMTSTR)>54 GMTSTR=$$WRAP^GMTSORC(GMTSTR,54)
. . F GMJ=1:1:$L(GMTSTR,"|") D Q:$D(GMTSQIT)
. . . D CKP^GMTSUP Q:$D(GMTSQIT) W ?$S(GMJ=1:25,1:26),$P(GMTSTR,"|",GMJ),!
. Q:$D(GMTSQIT)
Q:$D(GMTSQIT)
LAB ; Lab Work
I $L($G(REC(130,GMN,"LAB"))) D CKP^GMTSUP Q:$D(GMTSQIT) W ?11,"Lab Work: ",$G(REC(130,GMN,"LAB")),!
RPTDT ; Dates
DICDT ; Dictation Date
S GMTSTR=$G(REC(130,GMN,15,"S")) S:'$L(GMTSTR) GMTSTR=$G(REC(130,GMN,15,"E"))
I $L(GMTSTR) D CKP^GMTSUP Q:$D(GMTSQIT) W ?5,"Dictation Time:",?21,GMTSTR
TRCDT ; Transcription Time
S GMTSTR=$G(REC(130,GMN,39,"S")) S:'$L(GMTSTR) GMTSTR=$G(REC(130,GMN,39,"E"))
I $L(GMTSTR) D CKP^GMTSUP Q:$D(GMTSQIT) W ?41,"Transcription Time:",?61,GMTSTR
D:$L($G(REC(130,GMN,15,"I")))!($L($G(REC(130,GMN,39,"I")))) CKP^GMTSUP Q:$D(GMTSQIT) W:$L($G(REC(130,GMN,15,"I")))!($L($G(REC(130,GMN,39,"I")))) !
RPT ; Dictation
S GMCOUNT=+($G(GMCOUNT))+1
I $O(REC(130,GMN,1.15,0))>0 D
. I +($$PROK^GMTSU("SROGMTS",100))=0 N GMI D CKP^GMTSUP Q:$D(GMTSQIT) W "Surgeon's Dictation:",!
. S GMI=$S(+($$PROK^GMTSU("SROGMTS",100))=1:1,1:0) F S GMI=$O(REC(130,GMN,1.15,GMI)) Q:+GMI=0 D Q:$D(GMTSQIT)
. . D CKP^GMTSUP Q:$D(GMTSQIT) W ?2,$G(REC(130,GMN,1.15,GMI)),!
Q:$D(GMTSQIT)
Q
GMTSRO ; SLC/JER,KER - All Surgery Reports ; 06/24/2002 [8/3/04 2:10pm]
+1 ;;2.7;Health Summary;**9,11,28,37,57**;Oct 20, 1995
+2 ;
+3 ; External References
+4 ; DBIA 3590 HS^SROGMTS
+5 ;
ENSRO ; Entry Point for Surgery Only Component
+1 SET GMTSSO=1
+2 ;
ENSR ; Entry Point for SURGERY REPORT component
+1 ; (includes NON-OR procedures)
+2 NEW GMTSMX,GMCOUNT,GMIDT,GMN,SURG,GMTSGL
SET GMTSGL=$$GL^GMTSROE
IF '$LENGTH(GMTSGL)
QUIT
IF '$DATA(@(GMTSGL_"""B"","_DFN_")"))
QUIT
+3 SET GMTSMX=999
IF $DATA(GMTSNDM)
IF (GMTSNDM>0)
SET GMTSMX=GMTSNDM
+4 SET GMN=0
FOR
SET GMN=$ORDER(@(GMTSGL_"""B"","_DFN_","_GMN_")"))
IF GMN'>0
QUIT
DO SORT
+5 IF '$DATA(SURG)
QUIT
SET (GMCOUNT,GMIDT)=0
FOR
SET GMIDT=$ORDER(SURG(GMIDT))
IF GMIDT'>0!(GMCOUNT'<GMTSMX)
QUIT
SET GMN=SURG(GMIDT)
DO WRT
IF $DATA(GMTSQIT)
QUIT
+6 KILL GMTSSO
QUIT
+7 ;
SORT ; Sort Surgeries by Inverse Date
+1 NEW GMDT
SET GMDT=$PIECE($GET(@(GMTSGL_GMN_",0)")),U,9)
IF GMDT>GMTSBEG&(GMDT<GMTSEND)
Begin DoDot:1
+2 FOR
IF '$DATA(SURG(9999999-GMDT))
QUIT
SET GMDT=GMDT+.0001
+3 SET SURG(9999999-GMDT)=GMN
End DoDot:1
+4 QUIT
+5 ;
WRT ; Write Surgical Case Record
+1 NEW REC,X,GMI,GMJ,GMDT,GMTSTR
+2 IF +($$PROK^GMTSU("SROGMTS",100))>0
DO HS^SROGMTS(GMN)
+3 IF +($$PROK^GMTSU("SROGMTS",100))'>0
DO ONE^GMTSROE(GMN)
NONOP ; Non-Op Procedure
+1 ; Quit if Surgery Only
+2 IF $GET(REC(130,GMN,118,"I"))="Y"&(+($GET(GMTSSO))>0)
QUIT
+3 ; Print if SR*3*100
+4 ;G:+($$PROK^GMTSU("SROGMTS",100))>0 OPER
+5 IF $GET(REC(130,GMN,118,"I"))'="Y"
GOTO OPER
+6 ; Print if NOT SR*3*100
+7 IF $GET(REC(130,GMN,118,"I"))="Y"
IF $GET(GMTSSO)
QUIT
DO WRT^GMTSRON
QUIT
+8 SET GMCOUNT=GMCOUNT+1
OPER ; Operative Procedure
SS ; Date/Specialty/Surgeon
+1 DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
+2 SET GMDT=$GET(REC(130,GMN,.09,"S"))
IF '$LENGTH(GMDT)
SET GMDT=$$ED^GMTSU($GET(REC(130,GMN,.09,"I")))
+3 SET GMTSTR=$GET(REC(130,GMN,.04,"S"))
IF $LENGTH($GET(GMTSTR))>25
SET GMTSTR=$$WRAP^GMTSORC(GMTSTR,25)
+4 WRITE $GET(GMDT),?21,$PIECE($GET(GMTSTR),"|"),?47,"Surgeon:",?56,$GET(REC(130,GMN,.14,"E")),!
+5 FOR GMI=2:1:$LENGTH($GET(GMTSTR),"|")
DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
WRITE ?23,$PIECE($GET(GMTSTR),"|",GMI),!
SPA ; Status/Principal Anesthetist
+1 DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
+2 WRITE ?13,"Status:",?21,$GET(REC(130,GMN,"STATUS"))
+3 WRITE ?44,"Prin Anest:",?56,$GET(REC(130,GMN,.31,"E")),!
PREDX ; Principal Pre-Op Diagnosis
+1 DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
WRITE ?5,"Pre-op Diag(s):"
+2 SET GMTSTR=$GET(REC(130,GMN,32,"S"))
IF GMTSTR=""
SET GMTSTR=$GET(REC(130,GMN,32,"E"))
+3 IF $LENGTH(GMTSTR)&($LENGTH($GET(REC(130,GMN,"VERIFIED"))))
SET GMTSTR=GMTSTR_" "_$GET(REC(130,GMN,"VERIFIED"))
IF $LENGTH(GMTSTR)>58
SET GMTSTR=$$WRAP^GMTSORC(GMTSTR,58)
+4 FOR GMJ=1:1:$LENGTH(GMTSTR,"|")
Begin DoDot:1
+5 DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
WRITE ?$SELECT(GMJ=1:21,1:22),$PIECE(GMTSTR,"|",GMJ)
WRITE !
End DoDot:1
IF $DATA(GMTSQIT)
QUIT
+6 IF $DATA(GMTSQIT)
QUIT
OPREDX ; Other Pre-Op Diagnosis
+1 SET GMI=0
FOR
SET GMI=$ORDER(REC(130,GMN,130.17,GMI))
IF GMI'>0
QUIT
Begin DoDot:1
+2 SET GMTSTR=$GET(REC(130,GMN,130.17,GMI,.01,"S"))
IF GMTSTR=""
SET GMTSTR=$GET(REC(130,GMN,130.17,GMI,.01,"E"))
+3 IF $LENGTH(GMTSTR)&($LENGTH($GET(REC(130,GMN,"VERIFIED"))))
SET GMTSTR=GMTSTR_" "_$GET(REC(130,GMN,"VERIFIED"))
IF $LENGTH(GMTSTR)>58
SET GMTSTR=$$WRAP^GMTSORC(GMTSTR,58)
+4 FOR GMJ=1:1:$LENGTH(GMTSTR,"|")
Begin DoDot:2
+5 DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
WRITE ?$SELECT(GMJ=1:21,1:22),$PIECE(GMTSTR,"|",GMJ)
WRITE !
End DoDot:2
IF $DATA(GMTSQIT)
QUIT
End DoDot:1
+6 IF $DATA(GMTSQIT)
QUIT
PSTDX ; Post-Op Diagnosis
+1 DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
WRITE ?4,"Post-op Diag(s):"
+2 SET GMTSTR=$GET(REC(130,GMN,34,"S"))
IF GMTSTR=""
SET GMTSTR=$GET(REC(130,GMN,34,"E"))
IF $LENGTH(GMTSTR)>58
SET GMTSTR=$$WRAP^GMTSORC(GMTSTR,58)
+3 FOR GMJ=1:1:$LENGTH(GMTSTR,"|")
DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
WRITE ?$SELECT(GMJ=1:21,1:22),$PIECE(GMTSTR,"|",GMJ)
IF GMJ=1&(GMTSTR?1.A.E)
WRITE " ",$GET(REC(130,GMN,"VERIFIED"))
WRITE !
OPSTDX ; Other Post-Op Diagnosis
+1 SET GMI=0
FOR
SET GMI=$ORDER(REC(130,GMN,130.18,GMI))
IF GMI'>0
QUIT
Begin DoDot:1
+2 SET GMTSTR=$GET(REC(130,GMN,130.18,GMI,.01,"S"))
IF GMTSTR=""
SET GMTSTR=$GET(REC(130,GMN,130.18,GMI,.01,"E"))
IF $LENGTH(GMTSTR)>58
SET GMTSTR=$$WRAP^GMTSORC(GMTSTR,58)
+3 FOR GMJ=1:1:$LENGTH(GMTSTR,"|")
DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
WRITE ?$SELECT(GMJ=1:21,1:22),$PIECE(GMTSTR,"|",GMJ)
IF GMJ=1&(GMTSTR?1.A.E)
WRITE " ",$GET(REC(130,GMN,"VERIFIED"))
WRITE !
End DoDot:1
OP ; Operative Procedures
+1 DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
WRITE ?2,"Operative Proc(s):"
SET GMTSTR=$GET(REC(130,GMN,26,"S"))
IF GMTSTR=""
SET GMTSTR=$GET(REC(130,GMN,26,"E"))
IF $LENGTH(GMTSTR)>58
SET GMTSTR=$$WRAP^GMTSORC(GMTSTR,58)
+2 FOR GMJ=1:1:$LENGTH(GMTSTR,"|")
Begin DoDot:1
+3 DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
WRITE ?$SELECT(GMJ=1:21,1:22),$PIECE(GMTSTR,"|",GMJ),!
End DoDot:1
IF $DATA(GMTSQIT)
QUIT
+4 IF $DATA(GMTSQIT)
QUIT
OPM ; Operative Procedures (Modifiers)
+1 SET GMI=0
FOR
SET GMI=$ORDER(REC(130,GMN,130.028,GMI))
IF GMI'>0
QUIT
Begin DoDot:1
+2 SET GMTSTR=$GET(REC(130,GMN,130.028,GMI,.01,"S"))
IF GMTSTR=""
SET GMTSTR=$GET(REC(130,GMN,130.028,GMI,.01,"E"))
IF $LENGTH(GMTSTR)>54
SET GMTSTR=$$WRAP^GMTSORC(GMTSTR,54)
+3 FOR GMJ=1:1:$LENGTH(GMTSTR,"|")
Begin DoDot:2
+4 DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
WRITE ?$SELECT(GMJ=1:25,1:26),$PIECE(GMTSTR,"|",GMJ),!
End DoDot:2
IF $DATA(GMTSQIT)
QUIT
End DoDot:1
IF $DATA(GMTSQIT)
QUIT
+5 IF $DATA(GMTSQIT)
QUIT
OOP ; Other Procedures
+1 SET GMI=0
FOR
SET GMI=$ORDER(REC(130,GMN,130.16,GMI))
IF GMI'>0
QUIT
Begin DoDot:1
+2 SET GMTSTR=$GET(REC(130,GMN,130.16,GMI,.01,"S"))
IF GMTSTR=""
SET GMTSTR=$GET(REC(130,GMN,130.16,GMI,.01,"E"))
IF $LENGTH(GMTSTR)>58
SET GMTSTR=$$WRAP^GMTSORC(GMTSTR,58)
+3 FOR GMJ=1:1:$LENGTH(GMTSTR,"|")
Begin DoDot:2
+4 DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
+5 WRITE ?$SELECT(GMJ=1:21,1:22),$PIECE(GMTSTR,"|",GMJ),!
End DoDot:2
IF $DATA(GMTSQIT)
QUIT
OOPM ; Other Operative Procedures (Modifiers)
+1 NEW GMM
SET GMM=0
FOR
SET GMM=$ORDER(REC(130,GMN,130.16,GMI,130.164,GMM))
IF +GMM=0
QUIT
Begin DoDot:2
+2 SET GMTSTR=$GET(REC(130,GMN,130.16,GMI,130.164,GMM,.01,"S"))
IF '$LENGTH(GMTSTR)
SET GMTSTR=$GET(REC(130,GMN,130.16,GMI,130.164,GMM,.01,"E"))
IF $LENGTH(GMTSTR)>54
SET GMTSTR=$$WRAP^GMTSORC(GMTSTR,54)
+3 FOR GMJ=1:1:$LENGTH(GMTSTR,"|")
Begin DoDot:3
+4 DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
WRITE ?$SELECT(GMJ=1:25,1:26),$PIECE(GMTSTR,"|",GMJ),!
End DoDot:3
IF $DATA(GMTSQIT)
QUIT
End DoDot:2
+5 IF $DATA(GMTSQIT)
QUIT
End DoDot:1
+6 IF $DATA(GMTSQIT)
QUIT
LAB ; Lab Work
+1 IF $LENGTH($GET(REC(130,GMN,"LAB")))
DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
WRITE ?11,"Lab Work: ",$GET(REC(130,GMN,"LAB")),!
RPTDT ; Dates
DICDT ; Dictation Date
+1 SET GMTSTR=$GET(REC(130,GMN,15,"S"))
IF '$LENGTH(GMTSTR)
SET GMTSTR=$GET(REC(130,GMN,15,"E"))
+2 IF $LENGTH(GMTSTR)
DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
WRITE ?5,"Dictation Time:",?21,GMTSTR
TRCDT ; Transcription Time
+1 SET GMTSTR=$GET(REC(130,GMN,39,"S"))
IF '$LENGTH(GMTSTR)
SET GMTSTR=$GET(REC(130,GMN,39,"E"))
+2 IF $LENGTH(GMTSTR)
DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
WRITE ?41,"Transcription Time:",?61,GMTSTR
+3 IF $LENGTH($GET(REC(130,GMN,15,"I")))!($LENGTH($GET(REC(130,GMN,39,"I"))))
DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
IF $LENGTH($GET(REC(130,GMN,15,"I")))!($LENGTH($GET(REC(130,GMN,39,"I"))))
WRITE !
RPT ; Dictation
+1 SET GMCOUNT=+($GET(GMCOUNT))+1
+2 IF $ORDER(REC(130,GMN,1.15,0))>0
Begin DoDot:1
+3 IF +($$PROK^GMTSU("SROGMTS",100))=0
NEW GMI
DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
WRITE "Surgeon's Dictation:",!
+4 SET GMI=$SELECT(+($$PROK^GMTSU("SROGMTS",100))=1:1,1:0)
FOR
SET GMI=$ORDER(REC(130,GMN,1.15,GMI))
IF +GMI=0
QUIT
Begin DoDot:2
+5 DO CKP^GMTSUP
IF $DATA(GMTSQIT)
QUIT
WRITE ?2,$GET(REC(130,GMN,1.15,GMI)),!
End DoDot:2
IF $DATA(GMTSQIT)
QUIT
End DoDot:1
+6 IF $DATA(GMTSQIT)
QUIT
+7 QUIT