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

PXRMP6IS.m

Go to the documentation of this file.
  1. PXRMP6IS ; SLC/PKR - Inits for PXRM*2.0*6 ;03/30/2007
  1. ;;2.0;CLINICAL REMINDERS;**6**;Feb 04, 2005;Build 123
  1. ;Convert rule set sequences from free text to numerical.
  1. Q
  1. ;
  1. ;====================================================
  1. GENCON(FNUM,NODE,SFNUM1,SNODE,SFNUM2) ;General conversion routine. FNUM is the file number
  1. ;and NODE is the node.
  1. N CSEQ,D0,D1,D2,IENS,FDA,MSG,NSEQ,TEXT
  1. S D0=0
  1. F S D0=+$O(^PXRM(FNUM,D0)) Q:D0=0 D
  1. . S D1=0
  1. . F S D1=+$O(^PXRM(FNUM,D0,NODE,D1)) Q:D1=0 D
  1. .. S CSEQ=$P(^PXRM(FNUM,D0,NODE,D1,0),U,1)
  1. .. S NSEQ=+CSEQ
  1. .. I NSEQ=CSEQ Q
  1. .. S TEXT="^PXRM("_FNUM_","_D0_","_NODE_","_D1_",0) from "_CSEQ_" to "_NSEQ
  1. .. D MES^XPDUTL(TEXT)
  1. .. K IENS,FDA
  1. .. S IENS=D1_","_D0_","
  1. .. S FDA(SFNUM1,IENS,.01)=NSEQ
  1. .. D FILE^DIE("","FDA","MSG")
  1. .. I $D(MSG) D AWRITE^PXRMUTIL("MSG")
  1. .. I $G(SNODE)="" Q
  1. .. S D2=0
  1. .. F S D2=+$O(^PXRM(FNUM,D0,NODE,D1,SNODE,D2)) Q:D2=0 D
  1. ... S CSEQ=$P(^PXRM(FNUM,D0,NODE,D1,SNODE,D2,0),U,1)
  1. ... S NSEQ=+CSEQ
  1. ... I NSEQ=CSEQ Q
  1. ... S TEXT=" ^PXRM("_FNUM_","_D0_","_NODE_","_D1_","_SNODE_","_D2_",0) from "_CSEQ_" to "_NSEQ
  1. ... D MES^XPDUTL(TEXT)
  1. ... K IENS,FDA
  1. ... S IENS=D2_","_D1_","_D0_","
  1. ... S FDA(SFNUM2,IENS,.01)=NSEQ
  1. ... D FILE^DIE("","FDA","MSG")
  1. ... I $D(MSG) D AWRITE^PXRMUTIL("MSG")
  1. Q
  1. ;
  1. ;====================================================
  1. SEQCONV ;Convert all sequences from free text to numerical.
  1. D BMES^XPDUTL("Converting sequences from free text to numerical.")
  1. D BMES^XPDUTL("Converting sequences in file #810.2")
  1. D GENCON(810.2,10,810.21,10,810.22)
  1. D BMES^XPDUTL("Converting sequences in file #810.4")
  1. D GENCON(810.4,30,810.41)
  1. D BMES^XPDUTL("Converting sequences in file #810.7")
  1. D GENCON(810.7,10,810.701)
  1. D BMES^XPDUTL("Converting sequences in file #810.8")
  1. D GENCON(810.8,10,810.801)
  1. Q
  1. ;