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

BMCDXADD.m

Go to the documentation of this file.
  1. BMCDXADD ; IHS/PHXAO/TMJ - ADD DXs ;
  1. ;;4.0;REFERRED CARE INFO SYSTEM;;JAN 09, 2006
  1. ;
  1. ; This routine looks up an entry in the ICD DIAGNOSIS file (80).
  1. ;
  1. START ;
  1. D EN^XBNEW("EN^BMCICDLK","BMC*") ; new everthing except BMC*
  1. Q
  1. ;
  1. EN ; ENTRY POINT FOR ^XBNEW
  1. NEW BMCQ
  1. F D LOOP Q:BMCQ
  1. Q
  1. ;
  1. LOOP ;
  1. S BMCQ=1
  1. W:$G(IOF)'="" @IOF
  1. S DIC=80,DIC(0)="AEMQ" D DIC^BMCFMC
  1. Q:Y<0
  1. ; add new rcis diagnosis for dx just looked up
  1. S BMCLOOK=1
  1. S DIC="^BMCDX(",DIC(0)="L",DLAYGO=90001.01,DIC("DR")=".02////"_BMCDFN_";.03////"_BMCRIEN,X=+Y
  1. D FILE^BMCFMC
  1. K BMCLOOK
  1. Q:Y<0
  1. ; add other fields to dx just created
  1. S DIE="^BMCDX(",DA=+Y,DR=$S(BMCMODE="A":".04////P",1:".04")_";.05;.06"
  1. D DIE^BMCFMC
  1. Q