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

SD5371PT.m

Go to the documentation of this file.
  1. SD5371PT ;ALB/SEK - POST-INSTALL FOR PATCH SD*5.3*71 ; 24-OCT-96
  1. ;;5.3;Scheduling;**71**;AUG 13, 1993
  1. ;
  1. EN ; This routine will be executed upon installation of the KIDS build.
  1. ;
  1. ; This routine will loop through the active clinics ot the
  1. ; HOSPITAL LOCATION file (#44) and check providers
  1. ; (DEFAULT PROVIDER field #16 and PROVIDER field #.01 of the PROVIDER
  1. ; multiple #2600) in the NEW PERSON file (#200). If these providers
  1. ; are inactive or active with no active entry in the NEW PERSON
  1. ; file for PERSON CLASS, a list will be generated for the site.
  1. ; This PERSON CLASS check is the replacement screen for the
  1. ; provider key screen on the provider fields.
  1. ;
  1. K ^TMP($J)
  1. N CNT,CNT1,CNT2,CNT3,I,II,NODE,SDDP,SDINACT,SDNAMEC,SDNAMEP
  1. S CNT=0
  1. ;
  1. D BMES^XPDUTL("This will loop through the active clinics of the HOSPITAL LOCATION")
  1. D MES^XPDUTL("file (#44) and check for inactive providers and for active")
  1. D MES^XPDUTL("providers with no active entry in the NEW")
  1. D MES^XPDUTL("PERSON file (#200) for PERSON CLASS.")
  1. ;
  1. ;
  1. ;- get IEN from HOSPITAL LOCATION file using "AC" xref
  1. S I=0
  1. F S I=$O(^SC("AC","C",I)) Q:'I D
  1. .S NODE=$G(^SC(I,0)) Q:NODE']""
  1. .;
  1. .; check if active clinic
  1. .S SDINACT=$G(^SC(I,"I"))
  1. .Q:'$S(SDINACT']"":1,'+$P(SDINACT,"^"):1,DT<+$P(SDINACT,"^"):1,+$P(SDINACT,"^",2):1,1:0)
  1. .; get DEFAULT PROVIDER
  1. .S SDDP=$P(NODE,"^",13) I SDDP D CHECK
  1. .;
  1. .; get PROVIDER
  1. .S II=0 F S II=$O(^SC(I,"PR",II)) Q:'II D
  1. ..S SDDP=+$G(^SC(I,"PR",II,0)) Q:'SDDP D CHECK
  1. .Q
  1. ;
  1. ; print providers
  1. D BMES^XPDUTL("You have "_CNT_" providers that are inactive or active with no active")
  1. D MES^XPDUTL("entry in the NEW PERSON file for PERSON CLASS. The following")
  1. D MES^XPDUTL("list contains clinic(s) provider is assigned to:")
  1. S CNT1=0
  1. F S CNT1=$O(^TMP($J,CNT1)) Q:CNT1']"" D
  1. .S CNT2=0
  1. .F S CNT2=$O(^TMP($J,CNT1,CNT2)) Q:'CNT2 D
  1. ..D MES^XPDUTL(" "_CNT1_" (IEN="_CNT2_")")
  1. ..S CNT3=0
  1. ..F S CNT3=$O(^TMP($J,CNT1,CNT2,CNT3)) Q:CNT3']"" D
  1. ...D MES^XPDUTL(" "_CNT3)
  1. K ^TMP($J)
  1. Q
  1. ;
  1. CHECK ; check if provider is active and has an active entry for PERSON CLASS
  1. Q:$$SCREEN^SDUTL2(SDDP)
  1. ;
  1. S SDNAMEP=$P($G(^VA(200,+SDDP,0)),"^")
  1. S SDNAMEC=$P(NODE,"^")
  1. I '$D(^TMP($J,SDNAMEP,+SDDP)) D Q
  1. .S ^TMP($J,SDNAMEP,SDDP)=""
  1. .S ^TMP($J,SDNAMEP,SDDP,SDNAMEC)=""
  1. .S CNT=CNT+1
  1. I '$D(^TMP($J,SDNAMEP,+SDDP,SDNAMEC)) S ^TMP($J,SDNAMEP,SDDP,SDNAMEC)=""
  1. Q