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

AGEVLM0.m

Go to the documentation of this file.
AGEVLM0 ; cmi/flag/maw - AGEV Handle List Man Setup ;  
 ;;7.1;PATIENT REGISTRATION;;AUG 25,2005
 ;
 ;this routine will handle the way the list manager screen looks
 ;called from AGEVLM
 ;
 Q  ;not callable at top
 ;
MCD ;EP -- medicaid
 S AGEVX="",AGEVLINE=AGEVLINE+1
 ;
 S X="Insurer: "_IOUON_$$GET1^DIQ(9999999.18,AGEVINS,.01)_IOUOFF
 S AGEVX=$$SETSTR^VALM1(X,AGEVX,6,60)
 S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX,AGEVX=""
 S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF
 S AGEVLINE=AGEVLINE+1
 ;
 S X="Medicaid Name / DOB: "_IOUON_AGEVPOLH_" / "_AGEVPDOB_IOUOFF
 S AGEVX=$$SETSTR^VALM1(X,AGEVX,6,65)
 S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX
 S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF,AGEVX=""
 S AGEVLINE=AGEVLINE+1,AGEVX=""
 ;
 S X="Medicaid Number / State: "_IOUON_AGEVPOLN_" / "_AGEVPST_IOUOFF
 S AGEVX=$$SETSTR^VALM1(X,AGEVX,6,65)
 S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX
 S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF,AGEVX=""
 S AGEVLINE=AGEVLINE+1,AGEVX=""
 ;
 D SCOMMON   ;possible to call all commons from one spot
 Q
 ;
MCR ;EP -- medicare     
 S AGEVX="",AGEVLINE=AGEVLINE+1
 ;
 S X="Insurer: "_IOUON_$$GET1^DIQ(9999999.18,AGEVINS,.01)_IOUOFF
 S AGEVX=$$SETSTR^VALM1(X,AGEVX,6,60)
 S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX,AGEVX=""
 S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF
 S AGEVLINE=AGEVLINE+1
 ;
 S X="Medicare Name / DOB: "_IOUON_AGEVPOLH_" / "_AGEVPDOB_IOUOFF
 S AGEVX=$$SETSTR^VALM1(X,AGEVX,6,65)
 S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX
 S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF,AGEVX=""
 S AGEVLINE=AGEVLINE+1,AGEVX=""
 ;
 S X="Medicare Number: "_IOUON_AGEVPOLN_IOUOFF
 S AGEVX=$$SETSTR^VALM1(X,AGEVX,6,65)
 S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX
 S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF,AGEVX=""
 S AGEVLINE=AGEVLINE+1,AGEVX=""
 ;
 D SCOMMON
 Q
 ;
PI ;EP-- private insurace
 S AGEVRCNT=AGEVRCNT+1,AGEVLINE=AGEVLINE+1,AGEVCNT=AGEVCNT+1
 S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF,AGEVX=""
 S AGEVX=$$SETSTR^VALM1($J(AGEVCNT,2),AGEVX,2,2)
 ;
 S X="Insurer: "_IOUON_$$GET1^DIQ(9999999.18,AGEVINS,.01)_IOUOFF
 S AGEVX=$$SETSTR^VALM1(X,AGEVX,6,60)
 S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX,AGEVX=""
 S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF
 S AGEVLINE=AGEVLINE+1
 ;
 S X="Policy Holder: "_IOUON_AGEVPOLH_IOUOFF
 S AGEVX=$$SETSTR^VALM1(X,AGEVX,6,65)
 S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX
 S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF,AGEVX=""
 S AGEVLINE=AGEVLINE+1,AGEVX=""
 ;
 S X="Policy Number: "_IOUON_AGEVPOLN_IOUOFF
 S AGEVX=$$SETSTR^VALM1(X,AGEVX,6,65)
 S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX
 S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF,AGEVX=""
 S AGEVLINE=AGEVLINE+1,AGEVX=""
 ;
 D SCOMMON
 D DCOMMON^AGEVLM2
 ;
RR ;EP -- railroad     
 S AGEVX="",AGEVLINE=AGEVLINE+1
 ;
 S X="Insurer: "_IOUON_$$GET1^DIQ(9999999.18,AGEVINS,.01)_IOUOFF
 S AGEVX=$$SETSTR^VALM1(X,AGEVX,6,60)
 S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX,AGEVX=""
 S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF
 S AGEVLINE=AGEVLINE+1
 ;
 S X="Railroad Name: "_IOUON_AGEVPOLH_IOUOFF
 S AGEVX=$$SETSTR^VALM1(X,AGEVX,6,65)
 S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX
 S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF,AGEVX=""
 S AGEVLINE=AGEVLINE+1,AGEVX=""
 ;
 S X="Railroad Number: "_IOUON_AGEVPOLN_IOUOFF
 S AGEVX=$$SETSTR^VALM1(X,AGEVX,6,65)
 S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX
 S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF,AGEVX=""
 S AGEVLINE=AGEVLINE+1,AGEVX=""
 ;
 D SCOMMON
 ;
SCOMMON ;-- this is all the common subscriber calls
 I $O(AGEV("SUB REQ VAL",0)) D
 . S X="Subscriber Request Validation Message Codes: "
 . S AGEVX=$$SETSTR^VALM1(X,AGEVX,6,65)
 . S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX
 . S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF,AGEVX=""
 . S AGEVLINE=AGEVLINE+1,AGEVX=""
 . S AGEVIEN=0
 . F  S AGEVIEN=$O(AGEV("SUB REQ VAL",AGEVIEN)) Q:'AGEVIEN  D
 .. S AGEVCIEN=$G(AGEV("SUB REQ VAL",AGEVIEN))
 .. Q:AGEVCIEN=""
 .. S AGEVCCOD=$P($G(^AGEVAAA3(AGEVCIEN,0)),U)
 .. S AGEVCDSC=$P($G(^AGEVAAA3(AGEVCIEN,0)),U,2)
 .. Q:AGEVCCOD=""
 .. S X=IOUON_AGEVCCOD_" - "_AGEVCDSC_IOUOFF
 .. S AGEVX=$$SETSTR^VALM1(X,AGEVX,11,65)
 .. S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX
 .. S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF,AGEVX=""
 .. S AGEVLINE=AGEVLINE+1,AGEVX=""
 ..Q
 .Q
 ;
 I $O(AGEV("SUB DTP",0)) D
 . S X="Subscriber Date Qualifier Codes / Associated Date: "
 . S AGEVX=$$SETSTR^VALM1(X,AGEVX,6,65)
 . S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX
 . S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF,AGEVX=""
 . S AGEVLINE=AGEVLINE+1,AGEVX=""
 . S AGEVIEN=0
 . F  S AGEVIEN=$O(AGEV("SUB DTP",AGEVIEN)) Q:'AGEVIEN  D
 .. S AGEVCIEN=$G(AGEV("SUB DTP",AGEVIEN))
 .. Q:AGEVCIEN=""
 .. S AGEVP1=$P(AGEVCIEN,U)
 .. S AGEVP2=$P(AGEVCIEN,U,2)
 .. S AGEVCCOD=$P($G(^AGEVDTP1(AGEVP1,0)),U)
 .. S AGEVCDSC=$P($G(^AGEVDTP1(AGEVP1,0)),U,2)
 .. S AGEVDATE=$$FMTE^XLFDT(AGEVP2)
 .. Q:AGEVCCOD=""
 .. S X=IOUON_AGEVCCOD_" - "_AGEVCDSC_" / "_AGEVDATE_IOUOFF
 .. S AGEVX=$$SETSTR^VALM1(X,AGEVX,11,65)
 .. S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX
 .. S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF,AGEVX=""
 .. S AGEVLINE=AGEVLINE+1,AGEVX=""
 ..Q
 .Q
 ;
 ;elg/ben info
 S AGEVIEN=0
 F  S AGEVIEN=$O(AGEV("SUB ELG INFO",AGEVIEN)) Q:'AGEVIEN  D
 . ;record counter
 . S AGEVRCNT=AGEVRCNT+1,AGEVLINE=AGEVLINE+1,AGEVCNT=AGEVCNT+1
 . S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF,AGEVX=""
 . S AGEVX=$$SETSTR^VALM1($J(AGEVCNT,2),AGEVX,2,2)
 . ;
 . S AGEVCIEN=$G(AGEV("SUB ELG INFO",AGEVIEN))
 . S AGEVP1=$P(AGEVCIEN,U)
 . S AGEVP2=$P(AGEVCIEN,U,2)
 . S AGEVP3=$P(AGEVCIEN,U,3)
 . S AGEVEBCD=$S($G(AGEVP1):$P($G(^AGEVEB1(AGEVP1,0)),U),1:"")
 . S AGEVEBDS=$S($G(AGEVP1):$P($G(^AGEVEB1(AGEVP1,0)),U,2),1:"")
 . S AGEVSVCD=$S($G(AGEVP2):$P($G(^AGEVEB3(AGEVP2,0)),U),1:"")
 . S AGEVSVDS=$S($G(AGEVP2):$P($G(^AGEVEB3(AGEVP2,0)),U,2),1:"")
 . S AGEVITCD=$S($G(AGEVP3):$P($G(^AGEVEB4(AGEVP3,0)),U),1:"")
 . S AGEVITDS=$S($G(AGEVP3):$P($G(^AGEVEB4(AGEVP3,0)),U,2),1:"")
 . S X="Subscriber Eligibility Information Code: "
 . S AGEVX=$$SETSTR^VALM1(X,AGEVX,6,65)
 . S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX
 . S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF,AGEVX=""
 . S AGEVLINE=AGEVLINE+1,AGEVX=""
 . S X=IOUON_AGEVEBCD_" - "_AGEVEBDS_IOUOFF
 . I AGEVEBCD="" S X=""
 . S AGEVX=$$SETSTR^VALM1(X,AGEVX,11,65)
 . S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX
 . S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF,AGEVX=""
 . S AGEVLINE=AGEVLINE+1,AGEVX=""
 . S X="Service Type Code / Insurance Type Code: "
 . S AGEVX=$$SETSTR^VALM1(X,AGEVX,6,65)
 . S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX
 . S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF,AGEVX=""
 . S AGEVLINE=AGEVLINE+1,AGEVX=""
 . S X=IOUON_AGEVSVCD_" - "_$E(AGEVSVDS,1,25)_" / "_AGEVITCD_" - "
 . S X=X_$E(AGEVITDS,1,25)_IOUOFF
 . I AGEVSVCD="",AGEVITCD="" S X=""
 . S AGEVX=$$SETSTR^VALM1(X,AGEVX,11,65)
 . S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX
 . S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF,AGEVX=""
 . S AGEVLINE=AGEVLINE+1,AGEVX=""
 . ;
 . I $O(AGEV("SUB REF ID",AGEVIEN,0)) D
 .. S X="Subscriber Reference ID Codes / Associated Reference ID: "
 .. S AGEVX=$$SETSTR^VALM1(X,AGEVX,6,65)
 .. S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX
 .. S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF,AGEVX=""
 .. S AGEVLINE=AGEVLINE+1,AGEVX=""
 .. S AGEVSIEN=0
 .. F  S AGEVSIEN=$O(AGEV("SUB REF ID",AGEVIEN,AGEVSIEN)) Q:'AGEVSIEN  D
 ... S AGEVCIEN=$G(AGEV("SUB REF ID",AGEVIEN,AGEVSIEN))
 ... Q:AGEVCIEN=""
 ... S AGEVP1=$P(AGEVCIEN,U)
 ... S AGEVP2=$P(AGEVCIEN,U,2)
 ... S AGEVRCOD=$P($G(^AGEVREF1(AGEVP1,0)),U)
 ... S AGEVRDSC=$P($G(^AGEVREF1(AGEVP1,0)),U,2)
 ... S X=IOUON_AGEVRCOD_" - "_AGEVRDSC_" / "_AGEVP2_IOUOFF
 ... I AGEVRCOD="" S X=""
 ... S AGEVX=$$SETSTR^VALM1(X,AGEVX,11,65)
 ... S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX
 ... S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF,AGEVX=""
 ... S AGEVLINE=AGEVLINE+1,AGEVX=""
 ...Q
 ..Q
 . ;
 . I $O(AGEV("SUB ELG REQ VAL",AGEVIEN,0)) D
 .. S X="Subscriber Eligibility Request Validation Message Codes: "
 .. S AGEVX=$$SETSTR^VALM1(X,AGEVX,6,65)
 .. S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX
 .. S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF,AGEVX=""
 .. S AGEVLINE=AGEVLINE+1,AGEVX=""
 .. S AGEVSIEN=0
 .. F  S AGEVSIEN=$O(AGEV("SUB ELG REQ VAL",AGEVIEN,AGEVSIEN)) Q:'AGEVSIEN  D
 ... S AGEVCIEN=$G(AGEV("SUB ELG REQ VAL",AGEVIEN,AGEVSIEN))
 ... Q:AGEVCIEN=""
 ... S AGEVCCOD=$P($G(^AGEVAAA3(AGEVCIEN,0)),U)
 ... S AGEVCDSC=$P($G(^AGEVAAA3(AGEVCIEN,0)),U,2)
 ... S X=IOUON_AGEVCCOD_" - "_AGEVCDSC_IOUOFF
 ... I AGEVCCOD="" S X=""
 ... S AGEVX=$$SETSTR^VALM1(X,AGEVX,11,65)
 ... S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX
 ... S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF,AGEVX=""
 ... S AGEVLINE=AGEVLINE+1,AGEVX=""
 ...Q
 ..Q
 .;
 . I $O(AGEV("SUB ELG DTP",AGEVIEN,0)) D
 .. S X="Subscriber Elgibility Date Qualifier Codes / Associated Date: "
 .. S AGEVX=$$SETSTR^VALM1(X,AGEVX,6,65)
 .. S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX
 .. S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF,AGEVX=""
 .. S AGEVLINE=AGEVLINE+1,AGEVX=""
 .. S AGEVSIEN=0
 .. F  S AGEVSIEN=$O(AGEV("SUB ELG DTP",AGEVIEN,AGEVSIEN)) Q:'AGEVSIEN  D
 ... S AGEVCIEN=$G(AGEV("SUB ELG DTP",AGEVIEN,AGEVSIEN))
 ... Q:AGEVCIEN=""
 ... S AGEVP1=$P(AGEVCIEN,U)
 ... S AGEVP2=$P(AGEVCIEN,U,2)
 ... S AGEVCCOD=$P($G(^AGEVDTP1(AGEVP1,0)),U)
 ... S AGEVCDSC=$P($G(^AGEVDTP1(AGEVP1,0)),U,2)
 ... S AGEVDATE=$$FMTE^XLFDT(AGEVP2)
 ... S X=IOUON_AGEVCCOD_" - "_AGEVCDSC_" / "_AGEVDATE_IOUOFF
 ... I AGEVCCOD="" S X=""
 ... S AGEVX=$$SETSTR^VALM1(X,AGEVX,11,65)
 ... S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX
 ... S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF,AGEVX=""
 ... S AGEVLINE=AGEVLINE+1,AGEVX=""
 ...Q
 ..Q
 . ;
 . I $O(AGEV("SUB ELG MSG",AGEVIEN,0)) D
 .. S X="Subscriber Eligibility Additional Message: "
 .. S AGEVX=$$SETSTR^VALM1(X,AGEVX,6,65)
 .. S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX
 .. S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF,AGEVX=""
 .. S AGEVLINE=AGEVLINE+1,AGEVX=""
 .. S AGEVSIEN=0
 .. F  S AGEVSIEN=$O(AGEV("SUB ELG MSG",AGEVIEN,AGEVSIEN)) Q:'AGEVSIEN  D
 ... S AGEVCIEN=$G(AGEV("SUB ELG MSG",AGEVIEN,AGEVSIEN))
 ... Q:'$D(AGEVCIEN)
 ... S X=IOUON_AGEVCIEN_IOUOFF
 ... S AGEVX=$$SETSTR^VALM1(X,AGEVX,11,65)
 ... S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX
 ... S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF,AGEVX=""
 ... S AGEVLINE=AGEVLINE+1,AGEVX=""
 ...Q
 ..Q
 . ;
 . S X=""
 . S AGEVX=$$SETSTR^VALM1(X,AGEVX,6,70)
 . S ^TMP("AGEV",$J,AGEVLINE,0)=AGEVX,AGEVX=""
 . S ^TMP("AGEV",$J,"IDX",AGEVLINE,AGEVRCNT)=AGEVF
 .Q
 Q