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

ORFEDT.m

Go to the documentation of this file.
ORFEDT ;SLC/AGP - GENERIC EDIT FORM ;Aug 25, 2022@11:34:47
 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**405**;Dec 17, 1997;Build 211
 Q
 ;
BLDPRMPT(PROMPTS) ;
 S PROMPTS("pnumCode")=2
 S PROMPTS("pnumPrvdrIEN")=2
 S PROMPTS("pnumCategory")=3
 S PROMPTS("pnumNarrative")=4
 S PROMPTS("pnumExamResults")=5
 S PROMPTS("pnumSkinResults")=5
 S PROMPTS("pnumHFLevel")=5
 S PROMPTS("pnumImmSeries")=5
 S PROMPTS("pnumProcQty")=5
 S PROMPTS("pnumPEDLevel")=5
 S PROMPTS("pnumDiagPrimary")=5
 S PROMPTS("pnumPrvdrName")=5
 S PROMPTS("pnumProvider")=6
 S PROMPTS("pnumPrvdrPrimary")=6
 S PROMPTS("pnumWarnDate")=6
 S PROMPTS("pnumSkinReading")=7
 S PROMPTS("pnumImmReaction")=7
 S PROMPTS("pnumDiagAdd2PL")=7
 S PROMPTS("pnumSkinDTRead")=8
 S PROMPTS("pnumImmContra")=8
 S PROMPTS("pnumSkinDTGiven")=9
 S PROMPTS("pnumImmRefused")=9
 S PROMPTS("pnumCPTMods")=9
 S PROMPTS("pnumComment")=10
 ;S PROMPTS("pnumOutSideLocation")=11
 S PROMPTS("pnumSkinReader")=11
 S PROMPTS("pnumSkinReaderIEN")=11
 S PROMPTS("pnumWHPapResult")=11
 S PROMPTS("pnumWHNotPurp")=12
 S PROMPTS("pnumDataSource")=12
 S PROMPTS("pnumSkinOrderBy")=12
 S PROMPTS("pnumDate")=13
 S PROMPTS("pnumImmDosage")=13
 S PROMPTS("pnumSkinSite")=13
 S PROMPTS("pnumImmOrderByIEN")=20
 S PROMPTS("pnumRemGenFindID")=14
 S PROMPTS("pnumImmRoute")=14
 S PROMPTS("pnumSkinReadingComment")=14
 S PROMPTS("pnumImmSite")=15
 S PROMPTS("pnumImmLot")=16
 S PROMPTS("pnumRemGenFindNewData")=16
 S PROMPTS("pnumRemGenFindGroup")=17
 S PROMPTS("pnumImmManufacturer")=17
 S PROMPTS("pnumExpirationDate")=18
 S PROMPTS("pnumImmRouteIEN")=18
 S PROMPTS("pnumGFPrint")=18
 S PROMPTS("pnumAdminDate")=19
 S PROMPTS("pnumImmOrderByIEN")=20
 S PROMPTS("pnumIMMVIS")=21
 S PROMPTS("pnumImmOverride")=24
 ;S PROMPTS("pnumImmDocumType")=30
 ;S PROMPTS("pnumImmCPTCodes")=31
 S PROMPTS("pnumOutSideLocation")=32
 ;S PROMPTS("pnumImmDXCodes")=33
 S PROMPTS("pnumReadingIEN")=16
 S PROMPTS("pnumRefusedGroup")=11
 S PROMPTS("pnumAdminByPolicy")=31
 Q
 ;
BLDPARR(RESULT) ;
 S RESULT("ADMIN ROUTE")="pnumImmRoute"
 S RESULT("ADMIN SITE")="pnumImmSite"
 S RESULT("ANATOMIC LOC")="pnumImmSite"
 S RESULT("COMMENTS")="pnumComment"
 ;S RESULT("CODES CPT")="pnumImmCPTCodes"
 ;S RESULT("CODES DX")="pnumImmDXCodes"
 S RESULT("CONTRAINDICATED")="pnumImmContra"
 S RESULT("CONTRA/REFUSAL")="CONTRA"
 S RESULT("REFUSAL")="pnumImmRefused"
 S RESULT("CVX")=""
 S RESULT("DATA SOURCE")=""
 S RESULT("DATE RECORDED")=""
 S RESULT("DOCUMENTER")=""
 S RESULT("DOSE")="pnumImmDosage"
 S RESULT("DOSE UNITS")=""
 S RESULT("ENCOUNTER PROVIDER")="pnumProvider"
 S RESULT("EVENT DATE AND TIME")="pnumAdminDate"
 S RESULT("EXPIRATION DATE")="pnumExpirationDate"
 S RESULT("FACILITY")=""
 S RESULT("IMMUN")=4
 S RESULT("IMMUNIZATION")=4
 S RESULT("INFO SOURCE")="pnumDataSource"
 S RESULT("LOCATION")="pnumOutSideLocation"
 S RESULT("LOT NUMBER")="pnumImmLot"
 S RESULT("MANUFACTURER")="pnumImmManufacturer"
 S RESULT("ORDERING PROVIDER")="pnumImmOrderByIEN"
 S RESULT("OVERRIDE REASON")="pnumImmOverride"
 S RESULT("REACTION")="pnumImmReaction"
 S RESULT("PLACEMENT IEN")="pnumReadingIEN"
 S RESULT("READING")="pnumSkinReading"
 S RESULT("RESULTS")="pnumSkinResults"
 S RESULT("READING COMMENTS")="pnumComment"
 S RESULT("SERIES")="pnumImmSeries"
 S RESULT("SKIN TEST")=4
 S RESULT("VACCINE GROUP",1,0)=""
 S RESULT("VALUE")=""
 S RESULT("VIS OFFERED")="pnumIMMVIS"
 S RESULT("VISIT")=""
 S RESULT("VISIT DATE TIME")="pnumAdminDate"
 S RESULT("WARN UNTIL DATE")="pnumWarnDate"
 S RESULT("WARNING ACK")=""
 S RESULT("READER")="pnumSkinReader"
 S RESULT("DATE READ")="pnumSkinDTRead"
 S RESULT("CVXONLY")="pnumRefusedGroup"
 S RESULT("ORDERED BY POLICY")="pnumAdminByPolicy"
 Q
 ;
GETLAYOT(RESULT,INPUTS,DEFAULTS) ;
 N DATAARR,DATATYPE,DEFLIST,NODE,X
 M DATAARR=INPUTS("DATA")
 ;M EDITARR=INPUTS("EDIT DATA")
 S DATATYPE=DATAARR("TYPE")
 I $D(DEFAULTS) D BLDDEFLS(.DEFAULTS,.DEFLIST)
 I DATATYPE="SKIN TEST" D GET^ORFSKT(.RESULT,.DATAARR,.DEFLIST) Q
 I DATATYPE="IMMUNIZATION" D GET^ORFIMM(.RESULT,.DATAARR,.DEFLIST) Q
 ;I DATATYPE="ZZAGP" D GET^ZZAGPFEDT(.RESULT,.DATAARR,.DEFLIST) Q
 Q
 ;
BLDLAYOT(RESULT,INPUTS,TYPE,CONTROL) ;
 I CONTROL="SKIN TEST" D BLDLAYOT^ORFSKT(.RESULT,.INPUTS,TYPE) Q
 I CONTROL="IMMUNIZATION" D BLDLAYOT^ORFIMM(.RESULT,.INPUTS,TYPE) Q
 ;I CONTROL="ZZAGP" D BLDLAYOT^ZZAGPFEDT(.RESULT,.INPUTS,TYPE)
 Q
 ;
BLDDEFLS(DEFAULTS,DEFLIST) ;
 N CNT,LNAME,LNODE,MARRAY,MCNT,NODE
 S LNAME=0,MCNT=0
 S CNT=0 F  S CNT=$O(DEFAULTS(CNT)) Q:CNT'>0  D
 .S NODE=DEFAULTS(CNT)
 .I LNAME="" S LNAME=$P(NODE,U),DEFLIST(LNAME)=$P(NODE,U,2,$L(NODE,U)) Q
 .I LNAME=$P(NODE,U) S MCNT=MCNT+1,MARRAY(LNAME,MCNT)=$P(NODE,U,2,$L(NODE,U)) Q
 .I LNAME'=$P(NODE,U) S LNAME=$P(NODE,U) S DEFLIST($P(NODE,U))=$P(NODE,U,2,$L(NODE,U))
 I '$D(MARRAY) Q
 S LNAME="" F  S LNAME=$O(MARRAY(LNAME)) Q:LNAME=""  D
 .K DEFLIST(LNAME) S MCNT=0
 .S CNT=0 F  S CNT=$O(MARRAY(LNAME,CNT)) Q:CNT'>0  D
 ..S MCNT=MCNT+1,DEFLIST(LNAME,MCNT)=MARRAY(LNAME,CNT)
 Q
 ;
 ;
BLDRESLT(RESULTS,LIST,INPUTS) ;
 N CNT,DATETIME,ENCTYPE,LOC,X
 I INPUTS("TYPE")="IMMUNIZATION" D BLD^ORFIMM1(.RESULTS,.LIST,.INPUTS) G BLDX
 I INPUTS("TYPE")="SKIN TEST" D BLD^ORFSKT(.RESULTS,.LIST,.INPUTS) G BLDX
 ;I INPUTS("TYPE")="ZZAGP" D BLD^ZZAGPFEDT(.RESULTS,.LIST,.INPUTS)
BLDX ;
 ;
 S CNT=""
 S CNT=$O(RESULTS(CNT),-1)
 S X=0 F  S X=$O(LIST(X)) Q:X'>0  D
 .S CNT=CNT+1,RESULTS(CNT)="LAYOUT"_U_LIST(X)
 Q
 ;
GETSERIES(RESULTS) ;
 N DATALST,IDX
 D GETSET^ORWPCE2(.DATALST,9000010.11,.04,1)
 S IDX=0 F  S IDX=$O(DATALST(IDX)) Q:IDX'>0  D
 .S RESULTS("series",IDX,"internal")=$P(DATALST(IDX),U)
 .S RESULTS("series",IDX,"external")=$P(DATALST(IDX),U,2)
 Q
 ;