ECVICDDT ;ALB/MGD - Event Capture ICD-10 Implementation Date ;07 Aug 01
 ;;2.0;EVENT CAPTURE;**114**;8 May 96;Build 20
 ;
 ; RPC: EC ICD10IMPLEMENTATIONDATE 
 ;
 ; Reference to $$IMPDATE^LEXU supported by ICR #5679
 ; Reference to DD^%DT supported 
 ;
 ;  Input: Nothing
 ; Output: Implementation Date of ICD-10 Code Set in MM/DD/YYYY format
 ;         OR -1^Error Message
 ;
ICD10(RESULTS) ; Return the ICD-10 Code Set Implementation Date
 N ECICD10,ECICDDY,ECICDMO,ECICDYR,Y
 K ^TMP($J,"ECICD10")
 ; Call to retrieve ICD-10 Implementation Date
 S ECICD10=$$IMPDATE^LEXU("10D")
 ; Return error if lookup failed
 I +ECICD10<0 S ^TMP($J,"ECICD10",1)=ECICD10 Q
 ; Parse out Month and Date info prior to external call
 S ECICDMO=$E(ECICD10,4,5)
 S ECICDDY=$E(ECICD10,6,7)
 ; Call to get external format of year
 S Y=ECICD10
 D DD^%DT
 ; Load year from return value
 S ECICDYR=$P(Y,",",2),ECICDYR=$E(ECICDYR,2,5)
 ; Parse together MM/DD/YYYY
 S ECICD10=ECICDMO_"/"_ECICDDY_"/"_ECICDYR
 S ^TMP($J,"ECICD10",1)=ECICD10
 S RESULTS=$NA(^TMP($J,"ECICD10"))
 Q
 
--- Routine Detail   --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HECVICDDT   1083     printed  Sep 23, 2025@19:35:26                                                                                                                                                                                                    Page 2
ECVICDDT  ;ALB/MGD - Event Capture ICD-10 Implementation Date ;07 Aug 01
 +1       ;;2.0;EVENT CAPTURE;**114**;8 May 96;Build 20
 +2       ;
 +3       ; RPC: EC ICD10IMPLEMENTATIONDATE 
 +4       ;
 +5       ; Reference to $$IMPDATE^LEXU supported by ICR #5679
 +6       ; Reference to DD^%DT supported 
 +7       ;
 +8       ;  Input: Nothing
 +9       ; Output: Implementation Date of ICD-10 Code Set in MM/DD/YYYY format
 +10      ;         OR -1^Error Message
 +11      ;
ICD10(RESULTS) ; Return the ICD-10 Code Set Implementation Date
 +1        NEW ECICD10,ECICDDY,ECICDMO,ECICDYR,Y
 +2        KILL ^TMP($JOB,"ECICD10")
 +3       ; Call to retrieve ICD-10 Implementation Date
 +4        SET ECICD10=$$IMPDATE^LEXU("10D")
 +5       ; Return error if lookup failed
 +6        IF +ECICD10<0
               SET ^TMP($JOB,"ECICD10",1)=ECICD10
               QUIT 
 +7       ; Parse out Month and Date info prior to external call
 +8        SET ECICDMO=$EXTRACT(ECICD10,4,5)
 +9        SET ECICDDY=$EXTRACT(ECICD10,6,7)
 +10      ; Call to get external format of year
 +11       SET Y=ECICD10
 +12       DO DD^%DT
 +13      ; Load year from return value
 +14       SET ECICDYR=$PIECE(Y,",",2)
           SET ECICDYR=$EXTRACT(ECICDYR,2,5)
 +15      ; Parse together MM/DD/YYYY
 +16       SET ECICD10=ECICDMO_"/"_ECICDDY_"/"_ECICDYR
 +17       SET ^TMP($JOB,"ECICD10",1)=ECICD10
 +18       SET RESULTS=$NAME(^TMP($JOB,"ECICD10"))
 +19       QUIT