First Comment |
Call with: X (Required) The search text entered by the user APP (Required) The Lexicon APP parameter (e.g., "GMPX" for Problem List Subset, "10D" for ICD-10-CM, etc. [ORDATE] (Optional) the date of interest (Defaults to TODAY - should be passed as DATE OF SERVICE if not TODAY) [ORXTND] (Optional) Boolean flag specifying whether or not to use an extended search (Initial search is PL Subset of SCT, extended search is ICD (or 10D after impl.) (Defaults to 0 (FALSE)) [ORINCSYN] (Optional) Boolean flag specifying whether or not to include synonyms for SNOMED CT Concepts (Defaults to 0 (FALSE))
Returns: LST=local array name passed by ref, which contains search result set as: (1..n)=LEXIEN^PREFTEXT^CODESYS^CONCEPTID^ICDVER^DESIGID^PARENTSUBSCRIPT
|
Code |
N LEX,ILST,I,IEN,IMPLDT,SUBSET,FILTER S FILTER="" S IMPLDT=$$IMPDATE^LEXU("10D") S:APP="CPT" APP="CHP" ; LEX PATCH 10 I APP="ICD",'+$G(ORXTND) S APP=$S($E(X,1,3)?.1A2.3N:"ICD",1:"GMPX") S:'+$G(ORDATE) ORDATE=DT S ORINCSYN=+$G(ORINCSYN) I APP="ICD",(ORDATE' S SUBSET=$S(APP="GMPX":$S(ORDATE D CONFIG^LEXSET(APP,SUBSET,ORDATE) ;DBIA 1609 I APP="CHP" D . ; Set the filter for CPT only using CS APIs - format is the same as for DIC("S") . S ^TMP("LEXSCH",$J,"FIL",0)="I $L($$CPTONE^LEXU(+Y,$G(ORDATE)))!($L($$CPCONE^LEXU(+Y,$G(ORDATE))))" ;DBIA 1609 . ; Set Applications Default Flag (Lexicon can not overwrite filter) . S ^TMP("LEXSCH",$J,"ADF",0)=1 S X=$$UP^XLFSTR(X) D SRCH(.LST,X,APP,SUBSET,ORDATE,ORINCSYN)
|