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

IBDFFV2.m

Go to the documentation of this file.
  1. IBDFFV2 ;ALB/CMR - AICS FORM VALIDATION ; NOV 27,1995
  1. ;;3.0;AUTOMATED INFO COLLECTION SYS;;APR 24, 1997
  1. ;
  1. ; -- entry point from IBDFFV
  1. ; -- called to print out data validation
  1. ;
  1. Q:'$D(^TMP($J,"IBFV"))
  1. W:IOST["C-" @IOF
  1. N SORT,DOT
  1. S DOT=".",$P(DOT,".",35)=".",SORT=$O(^TMP($J,"IBFV","")) Q:SORT']""
  1. ; -- if sorted by form, gather forms to print
  1. I SORT="F" N FORM,TYPE,FRM,WRITE D Q
  1. .S TYPE=$P($T(TYPE+1),";;",2)
  1. .S FORM="" F S FORM=$O(^TMP($J,"IBFV",SORT,FORM)) Q:FORM']""!($G(IBDFOUT)) S FRM=0 F S FRM=$O(^TMP($J,"IBFV",SORT,FORM,FRM)) Q:'FRM!($G(IBDFOUT)) D PRINT^IBDFFV3(FRM,FORM) I '$G(WRITE) D
  1. ..S ^TMP($J,"IBDF","UC",SORT,FORM)=""
  1. ; -- if sorted by clinic, gather clinics
  1. I SORT="C" N CLIN,SETUP,CL,DG D Q
  1. .S CLIN="" F S CLIN=$O(^TMP($J,"IBFV",SORT,CLIN)) Q:CLIN']""!($G(IBDFOUT)) S CL="CLINIC: .."_DOT_" "_CLIN,DG="",SETUP=0 F S SETUP=$O(^TMP($J,"IBFV",SORT,CLIN,SETUP)) Q:'SETUP!($G(IBDFOUT)) D CLIN
  1. ; -- if sorted by group, gather groups or divisions and clinics
  1. I SORT="G"!(SORT="D") N HEADER,CLIN,SETUP,CL,DG D Q
  1. .S HEADER="" F S HEADER=$O(^TMP($J,"IBFV",SORT,HEADER)) Q:HEADER']""!($G(IBDFOUT)) D
  1. ..S CLIN="" F S CLIN=$O(^TMP($J,"IBFV",SORT,HEADER,CLIN)) Q:CLIN']""!($G(IBDFOUT)) D
  1. ...S DG=$S(SORT="G":"GROUP: ...",SORT="D":"DIVISION: ",1:"")
  1. ...I DG]"" S DG=DG_DOT_" "_HEADER
  1. ...S CL="CLINIC: .."_DOT_" "_CLIN
  1. ...S SETUP=0 F S SETUP=$O(^TMP($J,"IBFV",SORT,HEADER,CLIN,SETUP)) Q:'SETUP!($G(IBDFOUT)) D CLIN
  1. Q
  1. CLIN ; -- gather forms for clinics
  1. N NODE,TYPE,FRM,CHECK,WRITE,NAME
  1. S NODE=$G(^SD(409.95,SETUP,0))
  1. F I=2:1:9 S FRM=$P(NODE,U,I) I FRM D PRINT^IBDFFV3(FRM,.NAME,I,CL,DG) Q:$G(IBDFOUT) I '$D(WRITE) D
  1. .I SORT="C" S ^TMP($J,"IBDF","UC",SORT,CLIN,NAME)="" Q
  1. .S ^TMP($J,"IBDF","UC",SORT,HEADER,CLIN,NAME)=""
  1. Q