From 3fcc3308ab02983ad53d92dfd633d3350275361d Mon Sep 17 00:00:00 2001 From: sam Date: Tue, 15 Jul 2008 04:03:50 +0000 Subject: [PATCH] More work on the CCRVA200 --- p/CCRVA200.m | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/p/CCRVA200.m b/p/CCRVA200.m index 67eee56..c49fcee 100644 --- a/p/CCRVA200.m +++ b/p/CCRVA200.m @@ -42,5 +42,33 @@ TITLE(DUZ) ; Get Title for Proivder, PUBLIC; EXTRINSIC ; 200=New Person File; 8 is Title Field Q $$GET1^DIQ(200,DUZ_",",8) ; - +NPI(DUZ) ; Get NPI Number, PUBLIC; EXTRINSIC + ; INPUT: DUZ ByVal + ; OUTPUT: Delimited String in format: + ; IDType^ID^IDDescription + ; If the NPI doesn't exist, "" is returned. + ; This routine uses a call documented in the Kernel dev guide + ; This call returns as "NPI^TimeEntered^ActiveInactive" + ; It returns -1 for NPI if NPI doesn't exist. + N NPI S NPI=$P($$NPI^XUSNPI("Individual_ID",DUZ),U) + Q:NPI=-1 "" + Q "NPI^"_NPI_"^HHS" + ; +SPEC(DUZ) ; Get Provider Specialty, PUBLIC; EXTRINSIC + ; INPUT: DUZ ByVal + ; OUTPUT: String: ProviderType/Specialty/Subspecialty OR "" + ; Uses a Kernel API. Returns -1 if a specialty is not specified + ; in file 200. + ; Otherwise, returns IEN^Profession^Specialty^SubĀ­ specialty^Effect date^Expired date^VA code + N STR S STR=$$GET^XUA4A72(DUZ) + Q:+STR<0 "" + ; Sometimes we have 3 pieces, or 2. Deal with that. + Q:$L($P(STR,U,4)) $P(STR,U,2)_"/"_$P(STR,U,3)_"/"_$P(STR,U,4) + Q $P(STR,U,2)_"/"_$P(STR,U,3) + ; +ADDTYPE(DUZ) ; Get Address Type, PUBLIC; EXTRINSIC + ; INPUT: DUZ, but not needed really... here for future expansion + ; OUTPUT: At this point "Work" + Q "Work" + ;