[613] | 1 | DGPTFM6 ;ALB/BOK/ADL - 601 SCREEN: PROCEDURE ENTER/EDIT ; 21 JUL 88 @ 0900
|
---|
| 2 | ;;5.3;Registration;**164,510,729**;Aug 13, 1993;Build 59
|
---|
| 3 | ;;ADL;Update for CSV Project;;Mar 26, 2003
|
---|
| 4 | EN I $D(^DGPTF(PTF,70)),+^(70)<2871000 W !!,"Data cannot be entered into these fields until after 10/1/1987" H 5 G ^DGPTFM
|
---|
| 5 | I DT<2871000 W !!,"Data can not be entered into these fields until after 10/1/1987" H 5 G ^DGPTFM
|
---|
| 6 | G @($S(X=6:"E",1:X))
|
---|
| 7 | T ;ADD PROCEDURE RECORD
|
---|
| 8 | S DGZP=0 S:'$D(^DGPT(PTF,"P",0)) ^(0)="^45.05DA^^"
|
---|
| 9 | S DIC="^DGPT("_PTF_",""P"",",DIC(0)="AEQLMZ",DA(1)=PTF D ^DIC G ^DGPTFM:Y'>0!('$D(^DGPT(PTF,"P",+Y))) S DGPROCM=+Y,DGPROCD=$P(Y,U,2) D MOB I DGPC F I=1:1:DGPC S:P(I,1)=DGPROCM DGZP=I
|
---|
| 10 | G:'DGZP ^DGPTFM S DGPROC(DGZP)=DGPROCM,X="1,2"
|
---|
| 11 | EDIT G HELP:X<1!(X>2) S DIE="^DGPT(",(DA,DGPTF)=PTF,DR="[DG601]",DGJUMP=X
|
---|
| 12 | S DIE="^DGPT(",DGJUMP=X D ^DIE,CHK601^DGPTSCAN K DR,DIE,DIC,DA,DGADD,DGJUMP D MOB
|
---|
| 13 | SET D MOB:'$D(P) S:'$D(DGZP) DGZP=1 S P(DGZP,1)=$S($D(P(DGZP,1)):P(DGZP,1),1:"") I P(DGZP,1)="" K P(DGZP) G NEXP
|
---|
| 14 | S (P1,P(DGZP))=$S($D(^DGPT(PTF,"P",P(DGZP,1),0)):^(0),1:"")
|
---|
| 15 | WRT G:'$D(^DGPT(PTF,"P",P(DGZP,1),0)) ^DGPTFM S DGPROCI=^(0) W @IOF,HEAD,?68 S Z="<601-"_DGZP_">" W @DGVI,Z,@DGVO,!! S (Y,L)=+P(DGZP),Z=1 D D^DGPTUTL,Z^DGPTFM5 W $J("Date of Proc: ",32),Y,!,$J("Specialty: ",35)
|
---|
| 16 | W $S($D(^DIC(42.4,+$P(P(DGZP),U,2),0)):$P(^(0),U),1:""),! I $P(P(DGZP),U,4) W " Number of Dialysis Treatments: ",$P(P(DGZP),U,4),!
|
---|
| 17 | W !! S Z=2 D Z^DGPTFM5 W " Procedures: " F I=1:1:5 S L=$P(P(DGZP),U,4+I) I L S DGPTTMP=$$ICDOP^ICDCODE(+L,$$GETDATE^ICDGTDRG(PTF)) D
|
---|
| 18 | . W $S(+DGPTTMP>0&($P(DGPTTMP,U,10)):$P(DGPTTMP,U,5)_" ("_$P(DGPTTMP,U,2)_")",1:"**************"_L),!?19
|
---|
| 19 | F I=1:1:(IOSL-$Y-5) W !
|
---|
| 20 | S DGNUM=$S($D(P(DGZP+1)):601_"-"_(DGZP+1),1:"MAS") G 601^DGPTFJC:DGST
|
---|
| 21 | W "Enter <RET> to continue, 1-2 to edit,",!,"'T' to add a Procedure Segment, '^N' for screen N, or '^' to abort: <",DGNUM,">//"
|
---|
| 22 | R X:DTIME S:'$T X="^",DGPTOUT=""
|
---|
| 23 | K DGNUM G Q^DGPTF:X="^"
|
---|
| 24 | I X?1"^".E S DGPTSCRN=601 G ^DGPTFJ
|
---|
| 25 | G T:X="T"!(X="t"),HELP:X["?"
|
---|
| 26 | I X[1!(X[2) S DA=+P(DGZP) G EDIT
|
---|
| 27 | I X'="" G HELP
|
---|
| 28 | NEXP ;S DGZP=DGZP+1 G ^DGPTFM:'$D(P(DGZP)),SET
|
---|
| 29 | S DGZP=DGZP+1 I '$D(P(DGZP)) S DGZP=1 G ^DGPTFM
|
---|
| 30 | G SET
|
---|
| 31 | HELP W !,"Enter '^' to stop display and edit of data",!,"'^N' to jump to screen #N (appears in upper right of screen as <N>)",!,"<RET> to continue on to next screen or 1-2 to edit:"
|
---|
| 32 | W !?10,"1-Procedure information",!,?10,"2-Procedure codes",!,"You may also enter any combination of the above, separated by commas (ex:1,2)",!
|
---|
| 33 | R !!,"Enter <RET>: ",X:DTIME G WRT
|
---|
| 34 | MOB K P,P1,P2 S (I,P2)=0 F I1=1:1 S I=$O(^DGPT(PTF,"P",I)) Q:I'>0 S P(I1)=^(I,0),P(I1,1)=I I P(I1)']"" K P(I1) S I1=I1-1
|
---|
| 35 | S DGPC=I1-1 Q
|
---|
| 36 | BS ;CALLED FROM [DG601]
|
---|
| 37 | S I=$O(^DGPT(PTF,"M","AM",^DGPT(PTF,"P",DA,0)-.0000001)),I=$O(^(+I,0))
|
---|
| 38 | S DGMOVM=$S($D(^DGPT(PTF,"M",$S(I:I,1:1),0)):$P(^(0),U,2),1:"")
|
---|
| 39 | Q
|
---|
| 40 | R ;DELETE PROCEDURE RECORD
|
---|
| 41 | G R^DGPTFM4
|
---|
| 42 | E ;EDIT PROCEDURE RECORD
|
---|
| 43 | G E^DGPTFM1
|
---|
| 44 | P I $D(^DGPT(PTF,70)),+^(70)<2871000 G FY86
|
---|
| 45 | I DT<2871000 G FY86
|
---|
| 46 | S L="" F I=1:1:DGPC S L2=1 F J=5:1:9 I L2,$P(P(I),U,J)="" S L=L_I_",",L2=0
|
---|
| 47 | I L="" W !!,"There are no procedure records that can be added to.",*7 H 2 G ^DGPTFM
|
---|
| 48 | S L=$E(L,1,$L(L)-1) I L=+L S DGRC=+L G P2
|
---|
| 49 | P1 I 'Z W !!,"Add to procedure record <",L,"> : " R DGRC:DTIME G ^DGPTFM:DGRC[U!(DGRC="")
|
---|
| 50 | E S DGRC=+$E(A,2,99)
|
---|
| 51 | P2 I +DGRC'=DGRC!(","_L_","'[(","_DGRC_",")) W !!,"Enter the procedure record number to add ICD operation codes to: ",L G P1:'Z S Z="" G P1
|
---|
| 52 | S DP=45.05,DIE="^DGPT("_PTF_",""P"",",DA(1)=PTF,DR="" F I=5:1:9 I $P(P(DGRC),U,I)="" S DR=DR_(I-1)_";"
|
---|
| 53 | S DR=$E(DR,1,$L(DR)-1),DA=+P(DGRC,1),DA(1)=PTF D ^DIE K DR,DIE G ^DGPTFM
|
---|
| 54 | FY86 S DR="" F J=1:1:5 I $P(PROC,U,J)="" S DR=DR_(J/100+45)_";"
|
---|
| 55 | I DR="" W !!,"No more procedures can be added.",*7 H 2 G ^DGPTFM
|
---|
| 56 | S DR=$E(DR,1,$L(DR)-1),DP=45,DIE="^DGPT(",DA=PTF D ^DIE K DR,DIE G ^DGPTFM
|
---|
| 57 | GETVAR ;CALLED FROM GET+1^DGPTFM
|
---|
| 58 | S PM=I1-1,I=0 F I1=1:1 S I=$O(^DGPT(PTF,"S",I)) Q:I'>0 S S(I1)=^(I,0),S(I1,1)=I
|
---|
| 59 | K P2 S SU=I1-1 S PROC=$S($D(^DGPT(PTF,"401P")):^("401P"),1:""),P2=0 F J1=1:1:5 S:$P(PROC,U,J1) P2=P2+1,P2(P2)=J1
|
---|
| 60 | K P S I=0 F I1=1:1 S I=$O(^DGPT(PTF,"P",I)) Q:I'>0 S P(I1)=^(I,0),P(I1,1)=I
|
---|
| 61 | Q
|
---|