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

IBNCPDR.m

Go to the documentation of this file.
  1. IBNCPDR ;ALB/BDB - ROI MANAGEMENT, LIST MANAGER ;30-NOV-07
  1. ;;2.0;INTEGRATED BILLING;**384,550**;21-MAR-94;Build 25
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. ;
  1. ;Reference to $$PSSBILSD^PSS50 is supported by IA# 6245
  1. ;
  1. % ; -- main entry point
  1. EN ;
  1. D DT^DICRW
  1. K XQORS,VALMEVL
  1. D EN^VALM("IBNCR PATIENT RELEASE OF INFO")
  1. ENQ K DFN
  1. Q
  1. ;
  1. ;
  1. INIT ; -- set up inital variables
  1. S U="^",VALMCNT=0,VALMBG=1
  1. K ^TMP("IBNCR",$J)
  1. D:'$D(DFN) PAT G:$D(VALMQUIT) INITQ
  1. D BLD
  1. INITQ Q
  1. ;
  1. ;
  1. PAT ; -- select patient you are working with
  1. N DPTNOFZY S DPTNOFZY=1 ;Suppress PATIENT file fuzzy lookups
  1. S DIC(0)="AEQMN",DIC="^DPT(" D ^DIC K DIC I +Y<1 S VALMQUIT="" Q
  1. S DFN=+Y
  1. Q
  1. ;
  1. ;
  1. BLD ; -- build list of ROI'S
  1. K ^TMP("IBNCR",$J)
  1. N IBNCRI,IBNCRJ,IBNCRK,IBNCRL,IBNCRM,IBNCRX,IBNCRF
  1. S (IBNCRI,IBNCRJ,IBNCRK,IBNCRL,VALMCNT)=0
  1. ;
  1. ; -- find all ROI'S
  1. K IBNCRJ S IBNCRJ=0
  1. S IBNCRK=0 F S IBNCRK=$O(^IBT(356.25,"AC",DFN,IBNCRK)) Q:'IBNCRK S IBNCRL=0 F S IBNCRL=$O(^IBT(356.25,"AC",DFN,IBNCRK,IBNCRL)) Q:'IBNCRL D
  1. .; -- add to list
  1. . S IBNCRM=0 F S IBNCRM=$O(^IBT(356.25,"AC",DFN,IBNCRK,IBNCRL,IBNCRM)) Q:'IBNCRM D
  1. .. S IBNCRJ=IBNCRJ+1,IBNCRX=""
  1. .. S IBNCRX=$$SETFLD^VALM1(IBNCRJ,IBNCRX,"NUMBER")
  1. .. S IBNCRF=^IBT(356.25,IBNCRM,0)
  1. .. I $P(IBNCRF,"^",7)="0" S IBNCRX=IBNCRX_"I "
  1. .. S IBNCRX=$$SETFLD^VALM1($$DRUG^IBRXUTL1(IBNCRK),IBNCRX,"DRUG")
  1. .. I $D(^DIC(36,+IBNCRL,0)) S IBNCRX=$$SETFLD^VALM1($P(^(0),"^"),IBNCRX,"INSUR")
  1. .. S IBNCRX=$$SETFLD^VALM1($$DAT1^IBOUTL($P(IBNCRF,"^",5)),IBNCRX,"EFFDT")
  1. .. I $P(IBNCRF,"^",6)]"" S IBNCRX=IBNCRX_"thru"
  1. .. S IBNCRX=$$SETFLD^VALM1($$DAT1^IBOUTL($P(IBNCRF,"^",6)),IBNCRX,"EXPIRE")
  1. .. D SET(IBNCRX)
  1. BLDQ ;
  1. I VALMCNT=0 D SET(" -- No ROI's on file for patient --")
  1. Q
  1. ;
  1. SET(X) ; -- set arrays
  1. S VALMCNT=VALMCNT+1,^TMP("IBNCR",$J,VALMCNT,0)=X
  1. S ^TMP("IBNCR",$J,"IDX",VALMCNT,IBNCRJ)=""
  1. S ^TMP("IBNCRDX",$J,IBNCRJ)=$G(IBNCRM)
  1. Q
  1. ;
  1. HDR ; -- screen header for initial screen
  1. D PID^VADPT
  1. S VALMHDR(1)="ROI Management for Patient: "_$E($P($G(^DPT(DFN,0)),"^"),1,20)_" "_$E($G(^(0)),1)_VA("BID")
  1. S VALMHDR(2)=" "
  1. Q
  1. ;
  1. FNL ; -- exit and clean up
  1. K ^TMP("IBNCR",$J)
  1. D CLEAN^VALM10
  1. K VA,VAERR
  1. Q
  1. ;
  1. SENS(DRUG,IBBDAR) ; Sensitive Diagnosis Drug API
  1. ; Input: DRUG = drug file ien
  1. ; Output: IBBDAR (optional parameter) Pass by reference. Array of values for ECME processing
  1. ; Function value: 1 if the drug is a sensitive diagnosis drug, 0 otherwise
  1. ;
  1. N EPHNODE
  1. I '$G(DRUG) Q 0
  1. S EPHNODE=$$PSSBILSD^PSS50(DRUG) ;using PSS API to obtain this information IA#6245
  1. S IBBDAR("DRUG-SENSITIVE DX")=$P(EPHNODE,U,4)
  1. I $P(EPHNODE,U,4)=1 Q 1
  1. Q 0