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

BSTSDTSC.m

Go to the documentation of this file.
  1. BSTSDTSC ;GDIT/HS/BEE-Standard Terminology DTS Calls/Processing ; 5 Nov 2012 9:53 AM
  1. ;;2.0;IHS STANDARD TERMINOLOGY;;Dec 01, 2016;Build 62
  1. ;
  1. Q
  1. ;
  1. CLEAR(DTSNODE,NMID) ;EP - Clear out Custom Codeset Entries
  1. ;
  1. NEW DTSID,CONCEPT,DIEN,CIEN,TIEN,DA,DIK
  1. ;
  1. I $G(NMID)="" Q
  1. ;
  1. S DTSID=$P(DTSNODE,U) Q:DTSID=""
  1. S CONCEPT=$P(DTSNODE,U,2) Q:CONCEPT=""
  1. ;
  1. ;Look up the concepts pointed to (may be different)
  1. S DIEN=$O(^BSTS(9002318.4,"D",NMID,DTSID,""))
  1. S CIEN=$O(^BSTS(9002318.4,"C",NMID,CONCEPT,""))
  1. I CIEN=DIEN Q
  1. ;
  1. ;IENS are different so we need to get rid of both of them
  1. ;
  1. ;Get rid of the terms
  1. I DIEN]"" S TIEN="" F S TIEN=$O(^BSTS(9002318.3,"C",NMID,DIEN,TIEN)) Q:TIEN="" D
  1. . NEW DA,DIK
  1. . ;
  1. . S DA=TIEN,DIK="^BSTS(9002318.3," D ^DIK
  1. ;
  1. I CIEN]"" S TIEN="" F S TIEN=$O(^BSTS(9002318.3,"C",NMID,CIEN,TIEN)) Q:TIEN="" D
  1. . NEW DA,DIK
  1. . ;
  1. . S DA=TIEN,DIK="^BSTS(9002318.3," D ^DIK
  1. ;
  1. ;Get rid of the concepts
  1. I CIEN]"" S DA=CIEN,DIK="^BSTS(9002318.4," D ^DIK
  1. I DIEN]"" S DA=DIEN,DIK="^BSTS(9002318.4," D ^DIK
  1. ;
  1. Q