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

ADEPSUB3.m

Go to the documentation of this file.
ADEPSUB3 ; IHS/HQT/MJL - PRINT SUBROUTINES ;  [ 08/01/2001  1:08 PM ]
 ;;6.0;ADE;**9,15**;JAN 01, 2004
 ;
 ;$O Thru code subfile & increment counter for each code series
 ;Build ADEREP for ADEPER periods
 ;The array we're building is:
 ;ADEREP(DENTIST NAME,SERIES,CODE)="Week1 total,...week4total"
 ;AND ADEREP(DENTIST NAME,SERIES,"TOTAL")
 ;Where DENTIST NAME is printable name and:
 ; CODE SERIES= Visits, Diagnostics, Preventive, Restorative, etc
 ;
HSCREEN(ADEDFN,ADEPER) ;EP - HYGIENIST/THERAPIST REPORTS
 N ADENOD,ADEVDT,ADEJ,ADECODM
 S ADENOD=^ADEPCD(ADEDFN,0)
 S ADEVDT=$P(ADENOD,U,2)
 Q:'$$HYGSCN^ADEPQA1C(ADENOD)
 S ADEJ=0 F  S ADEJ=$O(^ADEPCD(ADEDFN,"ADA",ADEJ)) Q:'+ADEJ  D
 . N ADECOD,ADECNOD,ADEK,ADEWK
 . S ADECNOD=^ADEPCD(ADEDFN,"ADA",ADEJ,0)
 . Q:$P(ADECNOD,U,5)]""  ;Unreportable code
 . S ADECOD=^AUTTADA($P(ADECNOD,U),0)
 . ;----- BEGIN IHS MODIFICATIONS ADE*6.0*15
 . S ADECODRV=$P($G(^AUTTADA($P(ADECNOD,U),5)),U)  ;RELATIVE VALUE UNIT
 . ;----- END IHS MODIFICATIONS
 . S ADECODM=$P(ADECOD,U,4)
 . S ADECOD=$P(ADECOD,U)
 . S ADESER=""
 . F ADEK="V",0:1:4,8,9 I ADESER(ADEK)[ADECOD D  Q  ;MJL/HQT/IHS 8/31/01
 . . S ADESER=$S(ADEK="V":"1.PERSONS SERVED",ADEK="0":"2.DIAGNOSTICS",ADEK=1:"3.PREVENTIVE",ADEK=2:"4.RESTORATIVE",ADEK=3:"5.ENDODONTIC",ADEK=4:"6.PERIODONTIC",ADEK=7:"71.SURGICAL",ADEK=8:"72.ORTHO",ADEK=9:"73.OTHER",1:"")
 . I ADESER="",$E(ADECOD,1,1)=5!($E(ADECOD,1,1)=6),ADECOD'=6923 D
 . . S ADESER="7.PROSTHODONTIC"
 . Q:ADESER=""
 . I ADEPER=3 D SETREP3^ADEPSUB4(ADEHNAM($P(ADENOD,U,5)))
 . I ADEPER=4 D SETREP4^ADEPSUB4(ADEHNAM($P(ADENOD,U,5)))
 Q
 ;
DSCREEN(ADEDFN,ADEPER) ;EP - DENTIST REPORTS
 N ADENOD,ADEVDT,ADEJ,ADECODM
 S ADENOD=^ADEPCD(ADEDFN,0)
 S ADEVDT=$P(ADENOD,U,2)
 S ADEJ=0 F  S ADEJ=$O(^ADEPCD(ADEDFN,"ADA",ADEJ)) Q:'+ADEJ  D
 . N ADECOD,ADECNOD,ADEK,ADEWK,ADECODM
 . S ADECNOD=^ADEPCD(ADEDFN,"ADA",ADEJ,0)
 . Q:$P(ADECNOD,U,5)]""  ;Unreportable code
 . S ADECOD=^AUTTADA($P(ADECNOD,U),0)
 . ;----- BEGIN IHS MODIFICATIONS ADE*6.0*15
 . S ADECODRV=$P($G(^AUTTADA($P(ADECNOD,U),5)),U)  ;RELATIVE VALUE UNIT
 . ;----- END IHS MODIFICATIONS
 . S ADECODM=$P(ADECOD,U,4)
 . S ADECOD=$P(ADECOD,U)
 . I +ADEHYG,ADESER("HYG/THER DATA ENTRY CHECK")[ADECOD,$$HYGSCN^ADEPQA1C(ADENOD) Q
 . S ADESER=""
 . D
 . . I ADESER("ADEPHY-V")[ADECOD S ADESER="1.PERSONS SERVED" Q
 . . I $E(ADECOD,1,1)=0 S ADESER="2.DIAGNOSTICS" Q
 . . I $E(ADECOD,1,1)=1 S ADESER="3.PREVENTIVE" Q
 . . I $E(ADECOD,1,1)=2!(ADECOD=6973) S ADESER="4.RESTORATIVE" Q
 . . I $E(ADECOD,1,1)=3 S ADESER="5.ENDODONTIC" Q
 . . I $E(ADECOD,1,1)=4 S ADESER="6.PERIODONTIC" Q
 . . I $E(ADECOD,1,1)=5!($E(ADECOD,1,1)=6) S ADESER="7.PROSTHODONTIC" Q
 . . I $E(ADECOD,1,1)=7!(ADECOD=9930) S ADESER="71.SURGICAL" Q
 . . I $E(ADECOD,1,1)=8 S ADESER="72.ORTHO" Q
 . . S ADESER="73.OTHER SERVICES" Q
 . Q:ADESER=""
 . I ADEPER=3 D SETREP3^ADEPSUB4(ADEDNAM($P(ADENOD,U,4)))
 . I ADEPER=4 D SETREP4^ADEPSUB4(ADEDNAM($P(ADENOD,U,4)))
 Q