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

ECVICDDT.m

Go to the documentation of this file.
  1. ECVICDDT ;ALB/MGD - Event Capture ICD-10 Implementation Date ;07 Aug 01
  1. ;;2.0;EVENT CAPTURE;**114**;8 May 96;Build 20
  1. ;
  1. ; RPC: EC ICD10IMPLEMENTATIONDATE
  1. ;
  1. ; Reference to $$IMPDATE^LEXU supported by ICR #5679
  1. ; Reference to DD^%DT supported
  1. ;
  1. ; Input: Nothing
  1. ; Output: Implementation Date of ICD-10 Code Set in MM/DD/YYYY format
  1. ; OR -1^Error Message
  1. ;
  1. ICD10(RESULTS) ; Return the ICD-10 Code Set Implementation Date
  1. N ECICD10,ECICDDY,ECICDMO,ECICDYR,Y
  1. K ^TMP($J,"ECICD10")
  1. ; Call to retrieve ICD-10 Implementation Date
  1. S ECICD10=$$IMPDATE^LEXU("10D")
  1. ; Return error if lookup failed
  1. I +ECICD10<0 S ^TMP($J,"ECICD10",1)=ECICD10 Q
  1. ; Parse out Month and Date info prior to external call
  1. S ECICDMO=$E(ECICD10,4,5)
  1. S ECICDDY=$E(ECICD10,6,7)
  1. ; Call to get external format of year
  1. S Y=ECICD10
  1. D DD^%DT
  1. ; Load year from return value
  1. S ECICDYR=$P(Y,",",2),ECICDYR=$E(ECICDYR,2,5)
  1. ; Parse together MM/DD/YYYY
  1. S ECICD10=ECICDMO_"/"_ECICDDY_"/"_ECICDYR
  1. S ^TMP($J,"ECICD10",1)=ECICD10
  1. S RESULTS=$NA(^TMP($J,"ECICD10"))
  1. Q