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

DGPFPARM.m

Go to the documentation of this file.
  1. DGPFPARM ;ALB/RPM - PRF PARAMETER FILE EDIT ; 5/5/05 12:27pm
  1. ;;5.3;Registration;**425,554**;Aug 13, 1993
  1. ;
  1. Q ;no direct entry
  1. ;
  1. EN ;
  1. N DA,DD,DO,DIC,DIE,DINUM,DR,X,Y
  1. ;
  1. W !!,"Patient Record Flag Parameter Enter/Edit"
  1. I '$D(^DGPF(26.18,1,0)) D
  1. .W !,"You do not have an entry in your parameter file!!"
  1. .W !,"Creating a new entry in the PRF PARAMETER (#26.18) file... ",!
  1. .S DIC="^DGPF(26.18,",DIC(0)="",X=1,DINUM=1
  1. .K DD,DO D FILE^DICN W " done."
  1. .K %,DA,DIC,DIE,X,Y
  1. ;
  1. S DIE="^DGPF(26.18,",DA=1,DR="2;3" D ^DIE
  1. K DIE,DR,DA
  1. Q
  1. ;
  1. ON() ;Used to determine if the PRF software is 'active'.
  1. ;
  1. ; Input: None
  1. ;
  1. ;Output:
  1. ; Function Value - 1 = 'Active', 0 = 'Not Active'
  1. ;
  1. ; - init variables
  1. N DGACT,RESULT
  1. S RESULT=0
  1. ;
  1. ;- get software activation date from PRF PARAMETERS (#26.18) file
  1. S DGACT=+$P($G(^DGPF(26.18,1,0)),U,2)
  1. ;
  1. ; - check if activation is past current date
  1. D
  1. .Q:('DGACT)!(DT<DGACT)
  1. .S RESULT=1
  1. ;
  1. Q RESULT
  1. ;
  1. ORUON() ;Used to determine if ORU~R01 HL7 interface is 'enabled'.
  1. ;
  1. ;This function verifies that the PRF software is active and then
  1. ;returns the state of the Unsolicited Observation Update HL7 inteface
  1. ;in the PRF PARAMETERS (#26.18) file.
  1. ;
  1. ; Input:
  1. ; none
  1. ;
  1. ; Output:
  1. ; Function value - 1 if interface is enabled, 0 if interface is
  1. ; disabled
  1. ;
  1. Q:'$$ON() 0
  1. Q +$P($G(^DGPF(26.18,1,0)),U,3)
  1. ;
  1. QRYON() ;Used to determine if QRY~R02 HL7 interface is 'enabled'.
  1. ;
  1. ;This function verifies that the PRF software is active and then
  1. ;returns the state of the QRY HL7 inteface in the PRF PARAMETERS
  1. ;(#26.18) file.
  1. ;
  1. ; Input:
  1. ; none
  1. ;
  1. ; Output:
  1. ; Function value - 0 if interface is disabled, 1 if interface is
  1. ; enabled in 'direct' mode, 2 if interface is
  1. ; enabled in 'deferred' mode.
  1. ;
  1. Q:'$$ON() 0
  1. Q +$P($G(^DGPF(26.18,1,0)),U,4)
  1. ;
  1. P2ON() ;Used to determine if the PRF Phase 2 software is 'active'.
  1. ;
  1. ; Supported References:
  1. ; DBIA #4440 KERNEL SYSTEM PARAMETERS (PROD^XUPROD())
  1. ;
  1. ; Input: None
  1. ;
  1. ; Output:
  1. ; Function Value - 1 = 'Active', 0 = 'Not Active'
  1. ;
  1. N DGACT ;activation date
  1. N DGRESULT ;function value
  1. ;
  1. S DGRESULT=0
  1. ;
  1. ;- get software activation date from PRF PARAMETERS (#26.18) file
  1. S DGACT=+$P($G(^DGPF(26.18,1,0)),U,7)
  1. ;
  1. ;- check if activation is past current date in production
  1. I $$PROD^XUPROD() D ;production account
  1. . Q:('DGACT)!(DT<DGACT)
  1. . S DGRESULT=1
  1. E S DGRESULT=1 ;test account: always 'active'
  1. ;
  1. Q DGRESULT