PSOERXIG ;ALB/BWF - eRx Utilities/RPC's ; 8/3/2016 5:14pm
;;7.0;OUTPATIENT PHARMACY;**581**;DEC 1997;Build 126
;
Q
IVADMIN(ERXIEN,MIEN,MTYPE,MEDTYPE) ; parse and file IV administration data
N IVGL,SF,IENS,IVCLQ,IVQUOM,IVVAL,IVCATDES,IVCATCOD,IVCATTEX,IVDCODE,IVDTEXT,IVDDESC,IVCODE,IVTEXT,IVIDESC,IVICODE
N IVITEXT,IVNOL,IVADBR,IVADGA,IVADLEN,IVAPUMP,FDA,SF
S IVGL=$NA(^TMP($J,"PSOERXO1","Message",0,"Body",0,MTYPE,0,MEDTYPE,0))
S SF=52.49311
S IVCLQ=$G(@IVGL@("IVAdministration",0,"DiluentAmount",0,"CodeListQualifier",0))
S IVQUOM=$G(@IVGL@("IVAdministration",0,"DiluentAmount",0,"QuantityUnitOfMeasure",0,"Code",0))
S IVVAL=$G(@IVGL@("IVAdministration",0,"DiluentAmount",0,"Value",0))
S IVCATDES=$G(@IVGL@("IVAdministration",0,"IVAccessCatheterTip",0,"IVAccessCatheterTipDescription",0))
S IVCATCOD=$G(@IVGL@("IVAdministration",0,"IVAccessCatheterTip",0,"IVAccessCatheterTipType",0,"Code",0))
S IVCATTEX=$G(@IVGL@("IVAdministration",0,"IVAccessCatheterTip",0,"IVAccessCatheterTipType",0,"Text",0))
S IVDCODE=$G(@IVGL@("IVAdministration",0,"IVAccessDeviceType",0,"IVAccessDeviceType",0,"Code",0))
S IVDTEXT=$G(@IVGL@("IVAdministration",0,"IVAccessDeviceType",0,"IVAccessDeviceType",0,"Text",0))
S IVDDESC=$G(@IVGL@("IVAdministration",0,"IVAccessDeviceType",0,"IVAccessDeviceTypeDescription",0))
S IVCODE=$G(@IVGL@("IVAdministration",0,"IVAccessType",0,"Code",0))
S IVTEXT=$G(@IVGL@("IVAdministration",0,"IVAccessType",0,"Text",0))
S IVIDESC=$G(@IVGL@("IVAdministration",0,"IVInfusion",0,"IVInfusionDescription",0))
S IVICODE=$G(@IVGL@("IVAdministration",0,"IVInfusion",0,"IVInfusionType",0,"Code",0))
S IVITEXT=$G(@IVGL@("IVAdministration",0,"IVInfusion",0,"IVInfusionType",0,"Text",0))
S IVNOL=$G(@IVGL@("IVAdministration",0,"NumberOfLumens",0))
S IVADBR=$G(@IVGL@("IVAdministration",0,"SpecificAdministrationBrand",0))
S IVADGA=$G(@IVGL@("IVAdministration",0,"SpecificAdministrationGauge",0))
S IVADLEN=$G(@IVGL@("IVAdministration",0,"SpecificAdministrationLength",0))
S IVAPUMP=$G(@IVGL@("IVAdministration",0,"SpecificAdministrationPump",0))
S IENS=MIEN_","_ERXIEN_","
; iv admin # of lumens, iv admin diluent qty, iv admin diluent quom
S IVCLQ=$$PRESOLV^PSOERXA1(IVCLQ,"QCQ")
S IVQUOM=$$PRESOLV^PSOERXA1(IVQUOM,"NCI")
S FDA(SF,IENS,28)=IVNOL,FDA(SF,IENS,29.1)=IVVAL,FDA(SF,IENS,29.2)=IVCLQ,FDA(SF,IENS,29.3)=IVQUOM
; spec admin guage, brand, length, pump
S FDA(SF,IENS,30)=IVADGA,FDA(SF,IENS,31)=IVADBR,FDA(SF,IENS,32)=IVADLEN,FDA(SF,IENS,33.1)=IVAPUMP
; iva type code, iva type text, iva device desc, iva device type code, iva device type text
S FDA(SF,IENS,34.1)=IVCODE,FDA(SF,IENS,35)=IVTEXT,FDA(SF,IENS,36)=IVDDESC,FDA(SF,IENS,37.1)=IVDCODE,FDA(SF,IENS,38)=IVDTEXT
; iva catheter tip code, iva vatherter tip text, iva catheter tip desc
S FDA(SF,IENS,39.1)=IVCATCOD,FDA(SF,IENS,40)=IVCATTEX,FDA(SF,IENS,41)=IVCATDES
; iv infusion code, iv infusion text, iv infusion desc
S FDA(SF,IENS,42.1)=IVICODE,FDA(SF,IENS,43)=IVITEXT,FDA(SF,IENS,44)=IVIDESC
D CFDA^PSOERXIU(.FDA)
D FILE^DIE(,"FDA","IVERR") K FDA
Q
AGENCY(ERXIEN,MIEN,MTYPE,MEDTYPE) ; parse and file agency of service data
N AGGL,ABUSNAME,AGADDGL,AAL1,AAL2,ACITY,APOST,ASTATE,ACC,AGNTNMGL,AGNM,ALN,AFN,AMN,ASUFF,APREF,AGCOMMGL,EFFDATE,EXPDATE,GROUPSET,MTMFTEXT,MTMTEXT,MTMQUAL
N TTFREE,TTTEXT,TTQUAL,TTCODE,TOSFTEXT,TOSTEXT,TOSQUAL,TOSCODE,SF,IENS,AGNCGL,AGNTADD,MTMCODE
S AGGL=$NA(^TMP($J,"PSOERXO1","Message",0,"Body",0,MTYPE,0,MEDTYPE,0,"Service",0,"ServiceType",0))
S SF=52.49311,IENS=MIEN_","_ERXIEN_","
S AGNCGL=$NA(^TMP($J,"PSOERXO1","Message",0,"Body",0,MTYPE,0,MEDTYPE,0,"Service",0,"AgencyOfService",0))
S ABUSNAME=$G(@AGNCGL@("BusinessName",0))
S AGADDGL=$NA(^TMP($J,"PSOERXO1","Message",0,"Body",0,MTYPE,0,MEDTYPE,0,"Service",0,"AgencyOfService",0,"Address",0))
S AGNTADD=$$ADDRESS^PSOERXIU(AGADDGL)
S AAL1=$P(AGNTADD,U,1),AAL2=$P(AGNTADD,U,2),ACITY=$P(AGNTADD,U,3),APOST=$P(AGNTADD,U,5)
S ASTATE=$P(AGNTADD,U,4),ACC=$P(AGNTADD,U,6)
S ASTATE=$$STRES^PSOERXA2(APOST,ASTATE)
S AGNTNMGL=$NA(^TMP($J,"PSOERXO1","Message",0,"Body",0,MTYPE,0,MEDTYPE,0,"Service",0,"AgencyOfService",0,"AgencyContactName",0))
S AGNM=$$NAME^PSOERXIU(AGNTNMGL)
S ALN=$P(AGNM,U,1),AFN=$P(AGNM,U,2),AMN=$P(AGNM,U,3),ASUFF=$P(AGNM,U,4),APREF=$P(AGNM,U,5)
S AGCOMMGL=$NA(^TMP($J,"PSOERXO1","Message",0,"Body",0,MTYPE,0,MEDTYPE,0,"Service",0,"AgencyOfService",0))
S EFFDATE=$G(@AGGL@("EffectiveDate",0,"Date",0))
I '$L(EFFDATE) S EFFDATE=$G(@AGGL@("EffectiveDate",0,"DateTime",0))
S EFFDATE=$$CONVDTTM^PSOERXA1(EFFDATE)
S EXPDATE=$G(@AGGL@("ExpirationDate",0,"Date",0))
I '$L(EXPDATE) S EXPDATE=$G(@AGGL@("ExpirationDate",0,"DateTime",0))
S EXPDATE=$$CONVDTTM^PSOERXA1(EXPDATE)
S GROUPSET=$G(@AGGL@("TypeOfServiceGroupSetting",0))
S MTMFTEXT=$G(@AGGL@("ReasonForMTMServiceFreeText",0))
S MTMTEXT=$G(@AGGL@("ReasonForMTMServiceText",0))
S MTMQUAL=$G(@AGGL@("ReasonForMTMServiceQualifier",0))
S MTMCODE=$G(@AGGL@("ReasonForMTMServiceCode",0))
S TTFREE=$G(@AGGL@("TargetedTypeOfServiceFreeText",0))
S TTTEXT=$G(@AGGL@("TargetedTypeOfServiceText",0))
S TTQUAL=$G(@AGGL@("TargetedTypeOfServiceQualifier",0))
S TTCODE=$G(@AGGL@("TargetedTypeOfServiceCode",0))
S TOSFTEXT=$G(@AGGL@("TypeOfServiceFreeText",0))
S TOSTEXT=$G(@AGGL@("TypeOfServiceText",0))
S TOSQUAL=$G(@AGGL@("TypeOfServiceQualifier",0))
S TOSCODE=$G(@AGGL@("TypeOfServiceCode",0))
S IENS=MIEN_","_ERXIEN_","
; business name, agent address
S FDA(SF,IENS,21.1)=ABUSNAME,FDA(SF,IENS,21.2)=AAL1,FDA(SF,IENS,21.3)=AAL2,FDA(SF,IENS,21.4)=ACITY,FDA(SF,IENS,21.5)=ASTATE
S FDA(SF,IENS,21.6)=APOST,FDA(SF,IENS,21.7)=ACC
; agent name
S FDA(SF,IENS,27.1)=ALN,FDA(SF,IENS,27.2)=AFN,FDA(SF,IENS,27.3)=AMN,FDA(SF,IENS,27.4)=ASUFF,FDA(SF,IENS,27.5)=APREF
; type of effective date, type of expiration date, type of group setting
S FDA(SF,IENS,77)=EXPDATE,FDA(SF,IENS,78)=EFFDATE,FDA(SF,IENS,79)=GROUPSET
; type of service free text, type of service text, type of service qualifier, type of service code
S FDA(SF,IENS,64)=TOSFTEXT,FDA(SF,IENS,65)=TOSTEXT,FDA(SF,IENS,66)=TOSQUAL,FDA(SF,IENS,67)=TOSCODE
; targeted service free text, targeted service text, targeted service qualifier, targetd service code
S FDA(SF,IENS,68)=TTFREE,FDA(SF,IENS,69)=TTTEXT,FDA(SF,IENS,71)=TTQUAL,FDA(SF,IENS,72)=TTCODE
; reason for MTM service free text, text, code, qualifier
S FDA(SF,IENS,73)=MTMFTEXT,FDA(SF,IENS,74)=MTMTEXT,FDA(SF,IENS,75)=MTMQUAL,FDA(SF,IENS,76)=MTMCODE
D CFDA^PSOERXIU(.FDA)
D FILE^DIE(,"FDA","AGERR") K FDA
D COMM^PSOERXIU(AGCOMMGL,52.4931125,MIEN_","_ERXIEN,52.49311,26)
Q
WOUND(ERXIEN,MIEN,MTYPE,MEDTYPE) ; parse and file wound data
N WGL,I,IENS,SEQUENCE,DEPTH,LATCODE,LATTEXT,LENGTH,LOCCODE,LOCTEXT,WIDTH,FDA,SF
S WGL=$NA(^TMP($J,"PSOERXO1","Message",0,"Body",0,MTYPE,0,MEDTYPE,0))
S I=-1,SF=52.4931146,SEQUENCE=0
F S I=$O(@WGL@("Wound",I)) Q:I="" D
.S SEQUENCE=SEQUENCE+1
.S DEPTH=$G(@WGL@("Wound",I,"Depth",0))
.S LATCODE=$G(@WGL@("Wound",I,"Laterality",0,"Code",0))
.S LATTEXT=$G(@WGL@("Wound",I,"Laterality",0,"Text",0))
.S LENGTH=$G(@WGL@("Wound",I,"Length",0))
.S LOCCODE=$G(@WGL@("Wound",I,"Location",0,"Code",0))
.S LOCTEXT=$G(@WGL@("Wound",I,"Location",0,"Text",0))
.S WIDTH=$G(@WGL@("Wound",I,"Width",0))
.S IENS="+"_SEQUENCE_","_MIEN_","_ERXIEN_","
.; sequence
.S FDA(SF,IENS,.01)=SEQUENCE
.; location code, location text
.S FDA(SF,IENS,.02)=LOCCODE,FDA(SF,IENS,1)=LOCTEXT
.; laterality code, laterality text
.S FDA(SF,IENS,2.1)=LATCODE,FDA(SF,IENS,3)=LATTEXT
.; length, width, depth
.S FDA(SF,IENS,4.1)=LENGTH,FDA(SF,IENS,4.2)=WIDTH,FDA(SF,IENS,4.3)=DEPTH
D CFDA^PSOERXIU(.FDA)
D UPDATE^DIE(,"FDA") K FDA
Q
DRUGCS(ERXIEN,MIEN,MTYPE,MEDTYPE) ; parsing and filing drug coverage status data
N CSGL,I,SF,IENS,SEQUENCE,DRUGCSC,FDA,SF
S CSGL=$NA(^TMP($J,"PSOERXO1","Message",0,"Body",0,MTYPE,0,MEDTYPE,0))
S I=-1,SF=52.493117,SEQUENCE=0
F S I=$O(@CSGL@("DrugCoverageStatusCode",I)) Q:I="" D
.S SEQUENCE=SEQUENCE+1
.S DRUGCSC=$G(@CSGL@("DrugCoverageStatusCode",I))
.S IENS="+"_SEQUENCE_","_MIEN_","_ERXIEN_","
.; sequence, drug coverage status code
.S FDA(SF,IENS,.01)=SEQUENCE
.S FDA(SF,IENS,.02)=DRUGCSC
D UPDATE^DIE(,"FDA") K FDA
Q
TITRATE(ERXIEN,MIEN,MTYPE,MEDTYPE) ; parse and file titration data
N TGL,I,SF,IENS,SEQUENCE,PHTIDOSE,LOIN,MAXMEAS,MEASNOTE,MINMEAS,UCUM,VALIE,VITAL,FDA,MTNUMVAL,VARTIMOD,ADMINVAL,MUTEXT,MUQUAL
N MUCODE,MMTEXT,MMQUAL,MMCODE,METEXT,MEQUAL,MECODE,CLARTEXT,MNUMVAL,MFREMOD,MNUMVAL2,MFREQTEX,MFREQUAL,MFRECODE,MIVAL,MIMOD,MIVAL2
N MITEXT,MICODE,MIQUAL,MDVAL,MDTEXT,MDCODE,MDQUAL,MTTEXT,MTCODE,MTQUAL,MDCLTEXT,SF,UOM,VALUE
S TGL=$NA(^TMP($J,"PSOERXO1","Message",0,"Body",0,MTYPE,0,MEDTYPE,0))
S I=-1,SF=52.4931151,SEQUENCE=0
F S I=$O(@TGL@("Titration",I)) Q:I="" D
.S SEQUENCE=SEQUENCE+1
.S PHTIDOSE=$G(@TGL@("Titration",0,"PharmacyToTitrateDose",0))
.S LOIN=$G(@TGL@("Titration",0,"TitrationDose",0,"Measurement",I,"LOINCVersion",0))
.S MAXMEAS=$G(@TGL@("Titration",0,"TitrationDose",0,"Measurement",I,"MaximumMeasurementValue",0))
.S MEASNOTE=$G(@TGL@("Titration",0,"TitrationDose",0,"Measurement",I,"MeasurementNotes",0))
.S MINMEAS=$G(@TGL@("Titration",0,"TitrationDose",0,"Measurement",I,"MinimumMeasurementValue",0))
.S UCUM=$G(@TGL@("Titration",0,"TitrationDose",0,"Measurement",I,"UCUMVersion",0))
.S UOM=$G(@TGL@("Titration",0,"TitrationDose",0,"Measurement",I,"UnitOfMeasure",0))
.S VALUE=$G(@TGL@("Titration",0,"TitrationDose",0,"Measurement",I,"Value",0))
.S VITAL=$G(@TGL@("Titration",0,"TitrationDose",0,"Measurement",I,"VitalSign",0))
.S IENS="+"_SEQUENCE_","_MIEN_","_ERXIEN_","
.; sequence, vital sign, loinc version, value, UCUM version
.S FDA(SF,IENS,.01)=SEQUENCE,FDA(SF,IENS,1)=VITAL,FDA(SF,IENS,2)=LOIN,FDA(SF,IENS,3)=VALUE,FDA(SF,IENS,34)=UCUM
.; unit of measure, min measurement value, max measurement value, measurement notes
.S FDA(SF,IENS,4)=UOM,FDA(SF,IENS,5.1)=MINMEAS,FDA(SF,IENS,5.2)=MAXMEAS,FDA(SF,IENS,6)=MEASNOTE
D CFDA^PSOERXIU(.FDA)
D UPDATE^DIE(,"FDA") K FDA
S SEQUENCE=SEQUENCE+1
S TGL=$NA(^TMP($J,"PSOERXO1","Message",0,"Body",0,MTYPE,0,MEDTYPE,0,"Titration",0,"TitrationDose",0,"MeasurementTimingAndDuration",0))
S MTNUMVAL=$G(@TGL@("MeasurementAdministrationTiming",0,"MeasurementTimingNumericValue",0))
S VARTIMOD=$G(@TGL@("MeasurementAdministrationTiming",0,"VariableMeasurementTimingModifier",0))
S ADMINVAL=$G(@TGL@("MeasurementAdministrationTiming",0,"AdministrationTimingNumericValue",0))
S MUTEXT=$G(@TGL@("MeasurementAdministrationTiming",0,"MeasurementTimingUnits",0,"Text",0))
S MUQUAL=$G(@TGL@("MeasurementAdministrationTiming",0,"MeasurementTimingUnits",0,"Qualifier",0))
S MUCODE=$G(@TGL@("MeasurementAdministrationTiming",0,"MeasurementTimingUnits",0,"Code",0))
S MMTEXT=$G(@TGL@("MeasurementAdministrationTiming",0,"MeasurementTimingModifier",0,"Text",0))
S MMQUAL=$G(@TGL@("MeasurementAdministrationTiming",0,"MeasurementTimingModifier",0,"Qualifier",0))
S MMCODE=$G(@TGL@("MeasurementAdministrationTiming",0,"MeasurementTimingModifier",0,"Code",0))
S METEXT=$G(@TGL@("MeasurementAdministrationTiming",0,"MeasurementTimingEvent",0,"Text",0))
S MEQUAL=$G(@TGL@("MeasurementAdministrationTiming",0,"MeasurementTimingEvent",0,"Qualifier",0))
S MECODE=$G(@TGL@("MeasurementAdministrationTiming",0,"MeasurementTimingEvent",0,"Code",0))
S CLARTEXT=$G(@TGL@("MeasurementAdministrationTiming",0,"MeasurementTimingClarifyingFreeText",0))
S MNUMVAL=$G(@TGL@("MeasurementFrequency",0,"MeasurementFrequencyNumericValue",0))
S MFREMOD=$G(@TGL@("MeasurementFrequency",0,"MeasurementVariableFrequencyModifier",0))
S MNUMVAL2=$G(@TGL@("MeasurementFrequency",1,"MeasurementFrequencyNumericValue",0))
S MFREQTEX=$G(@TGL@("MeasurementFrequency",0,"MeasurementFrequencyUnits",0,"Text",0))
S MFREQUAL=$G(@TGL@("MeasurementFrequency",0,"MeasurementFrequencyUnits",0,"Qualifier",0))
S MFRECODE=$G(@TGL@("MeasurementFrequency",0,"MeasurementFrequencyUnits",0,"Code",0))
S MIVAL=$G(@TGL@("MeasurementInterval",0,"MeasurementIntervalNumericValue",0))
S MIMOD=$G(@TGL@("MeasurementInterval",0,"MeasurementVariableIntervalModifier",0))
S MIVAL2=$G(@TGL@("MeasurementInterval",1,"MeasurementIntervalNumericValue",0))
S MITEXT=$G(@TGL@("MeasurementInterval",0,"MeasurementIntervalUnits",0,"Text",0))
S MIQUAL=$G(@TGL@("MeasurementInterval",0,"MeasurementIntervalUnits",0,"Qualifier",0))
S MICODE=$G(@TGL@("MeasurementInterval",0,"MeasurementIntervalUnits",0,"Code",0))
S MDVAL=$G(@TGL@("MeasurementDuration",0,"MeasurementDurationNumericValue",0))
S MDTEXT=$G(@TGL@("MeasurementDuration",0,"MeasurementDurationText",0,"Text",0))
S MDQUAL=$G(@TGL@("MeasurementDuration",0,"MeasurementDurationText",0,"Qualifier",0))
S MDCODE=$G(@TGL@("MeasurementDuration",0,"MeasurementDurationText",0,"Code",0))
S MTTEXT=$G(@TGL@("MeasurementDurationTrigger",0,"MeasurementTrigger",0,"Text",0))
S MTQUAL=$G(@TGL@("MeasurementDurationTrigger",0,"MeasurementTrigger",0,"Qualifier",0))
S MTCODE=$G(@TGL@("MeasurementDurationTrigger",0,"MeasurementTrigger",0,"Code",0))
S MDCLTEXT=$G(@TGL@("MeasurementDurationTrigger",0,"MeasurementDurationClarifyingFreeText",0))
S IENS="+"_SEQUENCE_","_MIEN_","_ERXIEN_","
; sequence, timing numeric valie, variable timing mod, administration value
S FDA(SF,IENS,.01)=SEQUENCE,FDA(SF,IENS,7.1)=MTNUMVAL,FDA(SF,IENS,7.2)=VARTIMOD,FDA(SF,IENS,7.3)=ADMINVAL
; measurement units text, measurement unit qualifier, measurement unit code
S FDA(SF,IENS,8)=MUTEXT,FDA(SF,IENS,9)=MUQUAL,FDA(SF,IENS,10)=MUCODE
; measurement mod text, measurement mod qualifier, measuremend mod code
S FDA(SF,IENS,11)=MMTEXT,FDA(SF,IENS,12)=MMQUAL,FDA(SF,IENS,13)=MMCODE
; measurement event text, measurement event qualifier, measurement event code, measurement clarifying text
S FDA(SF,IENS,14)=METEXT,FDA(SF,IENS,15)=MEQUAL,FDA(SF,IENS,16)=MECODE,FDA(SF,IENS,17)=CLARTEXT
; measurement freq numeric value, measurement freq mod, measurement freq numeric value 2
S FDA(SF,IENS,18.1)=MNUMVAL,FDA(SF,IENS,18.2)=MFREMOD,FDA(SF,IENS,18.3)=MNUMVAL2
; measurement freq text, measurement freq qualifier, measurement freq code
S FDA(SF,IENS,19)=MFREQTEX,FDA(SF,IENS,20)=MFREQUAL,FDA(SF,IENS,21)=MFRECODE
; measurement in numeric value, measurement int modifier, measurement int numeric value 2
S FDA(SF,IENS,22.1)=MIVAL,FDA(SF,IENS,22.2)=MIMOD,FDA(SF,IENS,22.3)=MIVAL2
; measurement int text, measurement int qualifier, measurement int code
S FDA(SF,IENS,23)=MITEXT,FDA(SF,IENS,24)=MIQUAL,FDA(SF,IENS,25)=MICODE
; measurement duration valie, measurement duration text, measurement duration qualifier, measurement duration code
S FDA(SF,IENS,26)=MDVAL,FDA(SF,IENS,27)=MDTEXT,FDA(SF,IENS,28)=MDQUAL,FDA(SF,IENS,29)=MDCODE
; measurement duration trigger text, measurement duration trigger qualifier, measurement duration trigger code, measurement duration clarifying text
S FDA(SF,IENS,30)=MTTEXT,FDA(SF,IENS,31)=MTQUAL,FDA(SF,IENS,32)=MTCODE,FDA(SF,IENS,33)=MDCLTEXT
D CFDA^PSOERXIU(.FDA)
D UPDATE^DIE(,"FDA") K FDA
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSOERXIG 15187 printed Nov 22, 2024@17:38:41 Page 2
PSOERXIG ;ALB/BWF - eRx Utilities/RPC's ; 8/3/2016 5:14pm
+1 ;;7.0;OUTPATIENT PHARMACY;**581**;DEC 1997;Build 126
+2 ;
+3 QUIT
IVADMIN(ERXIEN,MIEN,MTYPE,MEDTYPE) ; parse and file IV administration data
+1 NEW IVGL,SF,IENS,IVCLQ,IVQUOM,IVVAL,IVCATDES,IVCATCOD,IVCATTEX,IVDCODE,IVDTEXT,IVDDESC,IVCODE,IVTEXT,IVIDESC,IVICODE
+2 NEW IVITEXT,IVNOL,IVADBR,IVADGA,IVADLEN,IVAPUMP,FDA,SF
+3 SET IVGL=$NAME(^TMP($JOB,"PSOERXO1","Message",0,"Body",0,MTYPE,0,MEDTYPE,0))
+4 SET SF=52.49311
+5 SET IVCLQ=$GET(@IVGL@("IVAdministration",0,"DiluentAmount",0,"CodeListQualifier",0))
+6 SET IVQUOM=$GET(@IVGL@("IVAdministration",0,"DiluentAmount",0,"QuantityUnitOfMeasure",0,"Code",0))
+7 SET IVVAL=$GET(@IVGL@("IVAdministration",0,"DiluentAmount",0,"Value",0))
+8 SET IVCATDES=$GET(@IVGL@("IVAdministration",0,"IVAccessCatheterTip",0,"IVAccessCatheterTipDescription",0))
+9 SET IVCATCOD=$GET(@IVGL@("IVAdministration",0,"IVAccessCatheterTip",0,"IVAccessCatheterTipType",0,"Code",0))
+10 SET IVCATTEX=$GET(@IVGL@("IVAdministration",0,"IVAccessCatheterTip",0,"IVAccessCatheterTipType",0,"Text",0))
+11 SET IVDCODE=$GET(@IVGL@("IVAdministration",0,"IVAccessDeviceType",0,"IVAccessDeviceType",0,"Code",0))
+12 SET IVDTEXT=$GET(@IVGL@("IVAdministration",0,"IVAccessDeviceType",0,"IVAccessDeviceType",0,"Text",0))
+13 SET IVDDESC=$GET(@IVGL@("IVAdministration",0,"IVAccessDeviceType",0,"IVAccessDeviceTypeDescription",0))
+14 SET IVCODE=$GET(@IVGL@("IVAdministration",0,"IVAccessType",0,"Code",0))
+15 SET IVTEXT=$GET(@IVGL@("IVAdministration",0,"IVAccessType",0,"Text",0))
+16 SET IVIDESC=$GET(@IVGL@("IVAdministration",0,"IVInfusion",0,"IVInfusionDescription",0))
+17 SET IVICODE=$GET(@IVGL@("IVAdministration",0,"IVInfusion",0,"IVInfusionType",0,"Code",0))
+18 SET IVITEXT=$GET(@IVGL@("IVAdministration",0,"IVInfusion",0,"IVInfusionType",0,"Text",0))
+19 SET IVNOL=$GET(@IVGL@("IVAdministration",0,"NumberOfLumens",0))
+20 SET IVADBR=$GET(@IVGL@("IVAdministration",0,"SpecificAdministrationBrand",0))
+21 SET IVADGA=$GET(@IVGL@("IVAdministration",0,"SpecificAdministrationGauge",0))
+22 SET IVADLEN=$GET(@IVGL@("IVAdministration",0,"SpecificAdministrationLength",0))
+23 SET IVAPUMP=$GET(@IVGL@("IVAdministration",0,"SpecificAdministrationPump",0))
+24 SET IENS=MIEN_","_ERXIEN_","
+25 ; iv admin # of lumens, iv admin diluent qty, iv admin diluent quom
+26 SET IVCLQ=$$PRESOLV^PSOERXA1(IVCLQ,"QCQ")
+27 SET IVQUOM=$$PRESOLV^PSOERXA1(IVQUOM,"NCI")
+28 SET FDA(SF,IENS,28)=IVNOL
SET FDA(SF,IENS,29.1)=IVVAL
SET FDA(SF,IENS,29.2)=IVCLQ
SET FDA(SF,IENS,29.3)=IVQUOM
+29 ; spec admin guage, brand, length, pump
+30 SET FDA(SF,IENS,30)=IVADGA
SET FDA(SF,IENS,31)=IVADBR
SET FDA(SF,IENS,32)=IVADLEN
SET FDA(SF,IENS,33.1)=IVAPUMP
+31 ; iva type code, iva type text, iva device desc, iva device type code, iva device type text
+32 SET FDA(SF,IENS,34.1)=IVCODE
SET FDA(SF,IENS,35)=IVTEXT
SET FDA(SF,IENS,36)=IVDDESC
SET FDA(SF,IENS,37.1)=IVDCODE
SET FDA(SF,IENS,38)=IVDTEXT
+33 ; iva catheter tip code, iva vatherter tip text, iva catheter tip desc
+34 SET FDA(SF,IENS,39.1)=IVCATCOD
SET FDA(SF,IENS,40)=IVCATTEX
SET FDA(SF,IENS,41)=IVCATDES
+35 ; iv infusion code, iv infusion text, iv infusion desc
+36 SET FDA(SF,IENS,42.1)=IVICODE
SET FDA(SF,IENS,43)=IVITEXT
SET FDA(SF,IENS,44)=IVIDESC
+37 DO CFDA^PSOERXIU(.FDA)
+38 DO FILE^DIE(,"FDA","IVERR")
KILL FDA
+39 QUIT
AGENCY(ERXIEN,MIEN,MTYPE,MEDTYPE) ; parse and file agency of service data
+1 NEW AGGL,ABUSNAME,AGADDGL,AAL1,AAL2,ACITY,APOST,ASTATE,ACC,AGNTNMGL,AGNM,ALN,AFN,AMN,ASUFF,APREF,AGCOMMGL,EFFDATE,EXPDATE,GROUPSET,MTMFTEXT,MTMTEXT,MTMQUAL
+2 NEW TTFREE,TTTEXT,TTQUAL,TTCODE,TOSFTEXT,TOSTEXT,TOSQUAL,TOSCODE,SF,IENS,AGNCGL,AGNTADD,MTMCODE
+3 SET AGGL=$NAME(^TMP($JOB,"PSOERXO1","Message",0,"Body",0,MTYPE,0,MEDTYPE,0,"Service",0,"ServiceType",0))
+4 SET SF=52.49311
SET IENS=MIEN_","_ERXIEN_","
+5 SET AGNCGL=$NAME(^TMP($JOB,"PSOERXO1","Message",0,"Body",0,MTYPE,0,MEDTYPE,0,"Service",0,"AgencyOfService",0))
+6 SET ABUSNAME=$GET(@AGNCGL@("BusinessName",0))
+7 SET AGADDGL=$NAME(^TMP($JOB,"PSOERXO1","Message",0,"Body",0,MTYPE,0,MEDTYPE,0,"Service",0,"AgencyOfService",0,"Address",0))
+8 SET AGNTADD=$$ADDRESS^PSOERXIU(AGADDGL)
+9 SET AAL1=$PIECE(AGNTADD,U,1)
SET AAL2=$PIECE(AGNTADD,U,2)
SET ACITY=$PIECE(AGNTADD,U,3)
SET APOST=$PIECE(AGNTADD,U,5)
+10 SET ASTATE=$PIECE(AGNTADD,U,4)
SET ACC=$PIECE(AGNTADD,U,6)
+11 SET ASTATE=$$STRES^PSOERXA2(APOST,ASTATE)
+12 SET AGNTNMGL=$NAME(^TMP($JOB,"PSOERXO1","Message",0,"Body",0,MTYPE,0,MEDTYPE,0,"Service",0,"AgencyOfService",0,"AgencyContactName",0))
+13 SET AGNM=$$NAME^PSOERXIU(AGNTNMGL)
+14 SET ALN=$PIECE(AGNM,U,1)
SET AFN=$PIECE(AGNM,U,2)
SET AMN=$PIECE(AGNM,U,3)
SET ASUFF=$PIECE(AGNM,U,4)
SET APREF=$PIECE(AGNM,U,5)
+15 SET AGCOMMGL=$NAME(^TMP($JOB,"PSOERXO1","Message",0,"Body",0,MTYPE,0,MEDTYPE,0,"Service",0,"AgencyOfService",0))
+16 SET EFFDATE=$GET(@AGGL@("EffectiveDate",0,"Date",0))
+17 IF '$LENGTH(EFFDATE)
SET EFFDATE=$GET(@AGGL@("EffectiveDate",0,"DateTime",0))
+18 SET EFFDATE=$$CONVDTTM^PSOERXA1(EFFDATE)
+19 SET EXPDATE=$GET(@AGGL@("ExpirationDate",0,"Date",0))
+20 IF '$LENGTH(EXPDATE)
SET EXPDATE=$GET(@AGGL@("ExpirationDate",0,"DateTime",0))
+21 SET EXPDATE=$$CONVDTTM^PSOERXA1(EXPDATE)
+22 SET GROUPSET=$GET(@AGGL@("TypeOfServiceGroupSetting",0))
+23 SET MTMFTEXT=$GET(@AGGL@("ReasonForMTMServiceFreeText",0))
+24 SET MTMTEXT=$GET(@AGGL@("ReasonForMTMServiceText",0))
+25 SET MTMQUAL=$GET(@AGGL@("ReasonForMTMServiceQualifier",0))
+26 SET MTMCODE=$GET(@AGGL@("ReasonForMTMServiceCode",0))
+27 SET TTFREE=$GET(@AGGL@("TargetedTypeOfServiceFreeText",0))
+28 SET TTTEXT=$GET(@AGGL@("TargetedTypeOfServiceText",0))
+29 SET TTQUAL=$GET(@AGGL@("TargetedTypeOfServiceQualifier",0))
+30 SET TTCODE=$GET(@AGGL@("TargetedTypeOfServiceCode",0))
+31 SET TOSFTEXT=$GET(@AGGL@("TypeOfServiceFreeText",0))
+32 SET TOSTEXT=$GET(@AGGL@("TypeOfServiceText",0))
+33 SET TOSQUAL=$GET(@AGGL@("TypeOfServiceQualifier",0))
+34 SET TOSCODE=$GET(@AGGL@("TypeOfServiceCode",0))
+35 SET IENS=MIEN_","_ERXIEN_","
+36 ; business name, agent address
+37 SET FDA(SF,IENS,21.1)=ABUSNAME
SET FDA(SF,IENS,21.2)=AAL1
SET FDA(SF,IENS,21.3)=AAL2
SET FDA(SF,IENS,21.4)=ACITY
SET FDA(SF,IENS,21.5)=ASTATE
+38 SET FDA(SF,IENS,21.6)=APOST
SET FDA(SF,IENS,21.7)=ACC
+39 ; agent name
+40 SET FDA(SF,IENS,27.1)=ALN
SET FDA(SF,IENS,27.2)=AFN
SET FDA(SF,IENS,27.3)=AMN
SET FDA(SF,IENS,27.4)=ASUFF
SET FDA(SF,IENS,27.5)=APREF
+41 ; type of effective date, type of expiration date, type of group setting
+42 SET FDA(SF,IENS,77)=EXPDATE
SET FDA(SF,IENS,78)=EFFDATE
SET FDA(SF,IENS,79)=GROUPSET
+43 ; type of service free text, type of service text, type of service qualifier, type of service code
+44 SET FDA(SF,IENS,64)=TOSFTEXT
SET FDA(SF,IENS,65)=TOSTEXT
SET FDA(SF,IENS,66)=TOSQUAL
SET FDA(SF,IENS,67)=TOSCODE
+45 ; targeted service free text, targeted service text, targeted service qualifier, targetd service code
+46 SET FDA(SF,IENS,68)=TTFREE
SET FDA(SF,IENS,69)=TTTEXT
SET FDA(SF,IENS,71)=TTQUAL
SET FDA(SF,IENS,72)=TTCODE
+47 ; reason for MTM service free text, text, code, qualifier
+48 SET FDA(SF,IENS,73)=MTMFTEXT
SET FDA(SF,IENS,74)=MTMTEXT
SET FDA(SF,IENS,75)=MTMQUAL
SET FDA(SF,IENS,76)=MTMCODE
+49 DO CFDA^PSOERXIU(.FDA)
+50 DO FILE^DIE(,"FDA","AGERR")
KILL FDA
+51 DO COMM^PSOERXIU(AGCOMMGL,52.4931125,MIEN_","_ERXIEN,52.49311,26)
+52 QUIT
WOUND(ERXIEN,MIEN,MTYPE,MEDTYPE) ; parse and file wound data
+1 NEW WGL,I,IENS,SEQUENCE,DEPTH,LATCODE,LATTEXT,LENGTH,LOCCODE,LOCTEXT,WIDTH,FDA,SF
+2 SET WGL=$NAME(^TMP($JOB,"PSOERXO1","Message",0,"Body",0,MTYPE,0,MEDTYPE,0))
+3 SET I=-1
SET SF=52.4931146
SET SEQUENCE=0
+4 FOR
SET I=$ORDER(@WGL@("Wound",I))
if I=""
QUIT
Begin DoDot:1
+5 SET SEQUENCE=SEQUENCE+1
+6 SET DEPTH=$GET(@WGL@("Wound",I,"Depth",0))
+7 SET LATCODE=$GET(@WGL@("Wound",I,"Laterality",0,"Code",0))
+8 SET LATTEXT=$GET(@WGL@("Wound",I,"Laterality",0,"Text",0))
+9 SET LENGTH=$GET(@WGL@("Wound",I,"Length",0))
+10 SET LOCCODE=$GET(@WGL@("Wound",I,"Location",0,"Code",0))
+11 SET LOCTEXT=$GET(@WGL@("Wound",I,"Location",0,"Text",0))
+12 SET WIDTH=$GET(@WGL@("Wound",I,"Width",0))
+13 SET IENS="+"_SEQUENCE_","_MIEN_","_ERXIEN_","
+14 ; sequence
+15 SET FDA(SF,IENS,.01)=SEQUENCE
+16 ; location code, location text
+17 SET FDA(SF,IENS,.02)=LOCCODE
SET FDA(SF,IENS,1)=LOCTEXT
+18 ; laterality code, laterality text
+19 SET FDA(SF,IENS,2.1)=LATCODE
SET FDA(SF,IENS,3)=LATTEXT
+20 ; length, width, depth
+21 SET FDA(SF,IENS,4.1)=LENGTH
SET FDA(SF,IENS,4.2)=WIDTH
SET FDA(SF,IENS,4.3)=DEPTH
End DoDot:1
+22 DO CFDA^PSOERXIU(.FDA)
+23 DO UPDATE^DIE(,"FDA")
KILL FDA
+24 QUIT
DRUGCS(ERXIEN,MIEN,MTYPE,MEDTYPE) ; parsing and filing drug coverage status data
+1 NEW CSGL,I,SF,IENS,SEQUENCE,DRUGCSC,FDA,SF
+2 SET CSGL=$NAME(^TMP($JOB,"PSOERXO1","Message",0,"Body",0,MTYPE,0,MEDTYPE,0))
+3 SET I=-1
SET SF=52.493117
SET SEQUENCE=0
+4 FOR
SET I=$ORDER(@CSGL@("DrugCoverageStatusCode",I))
if I=""
QUIT
Begin DoDot:1
+5 SET SEQUENCE=SEQUENCE+1
+6 SET DRUGCSC=$GET(@CSGL@("DrugCoverageStatusCode",I))
+7 SET IENS="+"_SEQUENCE_","_MIEN_","_ERXIEN_","
+8 ; sequence, drug coverage status code
+9 SET FDA(SF,IENS,.01)=SEQUENCE
+10 SET FDA(SF,IENS,.02)=DRUGCSC
End DoDot:1
+11 DO UPDATE^DIE(,"FDA")
KILL FDA
+12 QUIT
TITRATE(ERXIEN,MIEN,MTYPE,MEDTYPE) ; parse and file titration data
+1 NEW TGL,I,SF,IENS,SEQUENCE,PHTIDOSE,LOIN,MAXMEAS,MEASNOTE,MINMEAS,UCUM,VALIE,VITAL,FDA,MTNUMVAL,VARTIMOD,ADMINVAL,MUTEXT,MUQUAL
+2 NEW MUCODE,MMTEXT,MMQUAL,MMCODE,METEXT,MEQUAL,MECODE,CLARTEXT,MNUMVAL,MFREMOD,MNUMVAL2,MFREQTEX,MFREQUAL,MFRECODE,MIVAL,MIMOD,MIVAL2
+3 NEW MITEXT,MICODE,MIQUAL,MDVAL,MDTEXT,MDCODE,MDQUAL,MTTEXT,MTCODE,MTQUAL,MDCLTEXT,SF,UOM,VALUE
+4 SET TGL=$NAME(^TMP($JOB,"PSOERXO1","Message",0,"Body",0,MTYPE,0,MEDTYPE,0))
+5 SET I=-1
SET SF=52.4931151
SET SEQUENCE=0
+6 FOR
SET I=$ORDER(@TGL@("Titration",I))
if I=""
QUIT
Begin DoDot:1
+7 SET SEQUENCE=SEQUENCE+1
+8 SET PHTIDOSE=$GET(@TGL@("Titration",0,"PharmacyToTitrateDose",0))
+9 SET LOIN=$GET(@TGL@("Titration",0,"TitrationDose",0,"Measurement",I,"LOINCVersion",0))
+10 SET MAXMEAS=$GET(@TGL@("Titration",0,"TitrationDose",0,"Measurement",I,"MaximumMeasurementValue",0))
+11 SET MEASNOTE=$GET(@TGL@("Titration",0,"TitrationDose",0,"Measurement",I,"MeasurementNotes",0))
+12 SET MINMEAS=$GET(@TGL@("Titration",0,"TitrationDose",0,"Measurement",I,"MinimumMeasurementValue",0))
+13 SET UCUM=$GET(@TGL@("Titration",0,"TitrationDose",0,"Measurement",I,"UCUMVersion",0))
+14 SET UOM=$GET(@TGL@("Titration",0,"TitrationDose",0,"Measurement",I,"UnitOfMeasure",0))
+15 SET VALUE=$GET(@TGL@("Titration",0,"TitrationDose",0,"Measurement",I,"Value",0))
+16 SET VITAL=$GET(@TGL@("Titration",0,"TitrationDose",0,"Measurement",I,"VitalSign",0))
+17 SET IENS="+"_SEQUENCE_","_MIEN_","_ERXIEN_","
+18 ; sequence, vital sign, loinc version, value, UCUM version
+19 SET FDA(SF,IENS,.01)=SEQUENCE
SET FDA(SF,IENS,1)=VITAL
SET FDA(SF,IENS,2)=LOIN
SET FDA(SF,IENS,3)=VALUE
SET FDA(SF,IENS,34)=UCUM
+20 ; unit of measure, min measurement value, max measurement value, measurement notes
+21 SET FDA(SF,IENS,4)=UOM
SET FDA(SF,IENS,5.1)=MINMEAS
SET FDA(SF,IENS,5.2)=MAXMEAS
SET FDA(SF,IENS,6)=MEASNOTE
End DoDot:1
+22 DO CFDA^PSOERXIU(.FDA)
+23 DO UPDATE^DIE(,"FDA")
KILL FDA
+24 SET SEQUENCE=SEQUENCE+1
+25 SET TGL=$NAME(^TMP($JOB,"PSOERXO1","Message",0,"Body",0,MTYPE,0,MEDTYPE,0,"Titration",0,"TitrationDose",0,"MeasurementTimingAndDuration",0))
+26 SET MTNUMVAL=$GET(@TGL@("MeasurementAdministrationTiming",0,"MeasurementTimingNumericValue",0))
+27 SET VARTIMOD=$GET(@TGL@("MeasurementAdministrationTiming",0,"VariableMeasurementTimingModifier",0))
+28 SET ADMINVAL=$GET(@TGL@("MeasurementAdministrationTiming",0,"AdministrationTimingNumericValue",0))
+29 SET MUTEXT=$GET(@TGL@("MeasurementAdministrationTiming",0,"MeasurementTimingUnits",0,"Text",0))
+30 SET MUQUAL=$GET(@TGL@("MeasurementAdministrationTiming",0,"MeasurementTimingUnits",0,"Qualifier",0))
+31 SET MUCODE=$GET(@TGL@("MeasurementAdministrationTiming",0,"MeasurementTimingUnits",0,"Code",0))
+32 SET MMTEXT=$GET(@TGL@("MeasurementAdministrationTiming",0,"MeasurementTimingModifier",0,"Text",0))
+33 SET MMQUAL=$GET(@TGL@("MeasurementAdministrationTiming",0,"MeasurementTimingModifier",0,"Qualifier",0))
+34 SET MMCODE=$GET(@TGL@("MeasurementAdministrationTiming",0,"MeasurementTimingModifier",0,"Code",0))
+35 SET METEXT=$GET(@TGL@("MeasurementAdministrationTiming",0,"MeasurementTimingEvent",0,"Text",0))
+36 SET MEQUAL=$GET(@TGL@("MeasurementAdministrationTiming",0,"MeasurementTimingEvent",0,"Qualifier",0))
+37 SET MECODE=$GET(@TGL@("MeasurementAdministrationTiming",0,"MeasurementTimingEvent",0,"Code",0))
+38 SET CLARTEXT=$GET(@TGL@("MeasurementAdministrationTiming",0,"MeasurementTimingClarifyingFreeText",0))
+39 SET MNUMVAL=$GET(@TGL@("MeasurementFrequency",0,"MeasurementFrequencyNumericValue",0))
+40 SET MFREMOD=$GET(@TGL@("MeasurementFrequency",0,"MeasurementVariableFrequencyModifier",0))
+41 SET MNUMVAL2=$GET(@TGL@("MeasurementFrequency",1,"MeasurementFrequencyNumericValue",0))
+42 SET MFREQTEX=$GET(@TGL@("MeasurementFrequency",0,"MeasurementFrequencyUnits",0,"Text",0))
+43 SET MFREQUAL=$GET(@TGL@("MeasurementFrequency",0,"MeasurementFrequencyUnits",0,"Qualifier",0))
+44 SET MFRECODE=$GET(@TGL@("MeasurementFrequency",0,"MeasurementFrequencyUnits",0,"Code",0))
+45 SET MIVAL=$GET(@TGL@("MeasurementInterval",0,"MeasurementIntervalNumericValue",0))
+46 SET MIMOD=$GET(@TGL@("MeasurementInterval",0,"MeasurementVariableIntervalModifier",0))
+47 SET MIVAL2=$GET(@TGL@("MeasurementInterval",1,"MeasurementIntervalNumericValue",0))
+48 SET MITEXT=$GET(@TGL@("MeasurementInterval",0,"MeasurementIntervalUnits",0,"Text",0))
+49 SET MIQUAL=$GET(@TGL@("MeasurementInterval",0,"MeasurementIntervalUnits",0,"Qualifier",0))
+50 SET MICODE=$GET(@TGL@("MeasurementInterval",0,"MeasurementIntervalUnits",0,"Code",0))
+51 SET MDVAL=$GET(@TGL@("MeasurementDuration",0,"MeasurementDurationNumericValue",0))
+52 SET MDTEXT=$GET(@TGL@("MeasurementDuration",0,"MeasurementDurationText",0,"Text",0))
+53 SET MDQUAL=$GET(@TGL@("MeasurementDuration",0,"MeasurementDurationText",0,"Qualifier",0))
+54 SET MDCODE=$GET(@TGL@("MeasurementDuration",0,"MeasurementDurationText",0,"Code",0))
+55 SET MTTEXT=$GET(@TGL@("MeasurementDurationTrigger",0,"MeasurementTrigger",0,"Text",0))
+56 SET MTQUAL=$GET(@TGL@("MeasurementDurationTrigger",0,"MeasurementTrigger",0,"Qualifier",0))
+57 SET MTCODE=$GET(@TGL@("MeasurementDurationTrigger",0,"MeasurementTrigger",0,"Code",0))
+58 SET MDCLTEXT=$GET(@TGL@("MeasurementDurationTrigger",0,"MeasurementDurationClarifyingFreeText",0))
+59 SET IENS="+"_SEQUENCE_","_MIEN_","_ERXIEN_","
+60 ; sequence, timing numeric valie, variable timing mod, administration value
+61 SET FDA(SF,IENS,.01)=SEQUENCE
SET FDA(SF,IENS,7.1)=MTNUMVAL
SET FDA(SF,IENS,7.2)=VARTIMOD
SET FDA(SF,IENS,7.3)=ADMINVAL
+62 ; measurement units text, measurement unit qualifier, measurement unit code
+63 SET FDA(SF,IENS,8)=MUTEXT
SET FDA(SF,IENS,9)=MUQUAL
SET FDA(SF,IENS,10)=MUCODE
+64 ; measurement mod text, measurement mod qualifier, measuremend mod code
+65 SET FDA(SF,IENS,11)=MMTEXT
SET FDA(SF,IENS,12)=MMQUAL
SET FDA(SF,IENS,13)=MMCODE
+66 ; measurement event text, measurement event qualifier, measurement event code, measurement clarifying text
+67 SET FDA(SF,IENS,14)=METEXT
SET FDA(SF,IENS,15)=MEQUAL
SET FDA(SF,IENS,16)=MECODE
SET FDA(SF,IENS,17)=CLARTEXT
+68 ; measurement freq numeric value, measurement freq mod, measurement freq numeric value 2
+69 SET FDA(SF,IENS,18.1)=MNUMVAL
SET FDA(SF,IENS,18.2)=MFREMOD
SET FDA(SF,IENS,18.3)=MNUMVAL2
+70 ; measurement freq text, measurement freq qualifier, measurement freq code
+71 SET FDA(SF,IENS,19)=MFREQTEX
SET FDA(SF,IENS,20)=MFREQUAL
SET FDA(SF,IENS,21)=MFRECODE
+72 ; measurement in numeric value, measurement int modifier, measurement int numeric value 2
+73 SET FDA(SF,IENS,22.1)=MIVAL
SET FDA(SF,IENS,22.2)=MIMOD
SET FDA(SF,IENS,22.3)=MIVAL2
+74 ; measurement int text, measurement int qualifier, measurement int code
+75 SET FDA(SF,IENS,23)=MITEXT
SET FDA(SF,IENS,24)=MIQUAL
SET FDA(SF,IENS,25)=MICODE
+76 ; measurement duration valie, measurement duration text, measurement duration qualifier, measurement duration code
+77 SET FDA(SF,IENS,26)=MDVAL
SET FDA(SF,IENS,27)=MDTEXT
SET FDA(SF,IENS,28)=MDQUAL
SET FDA(SF,IENS,29)=MDCODE
+78 ; measurement duration trigger text, measurement duration trigger qualifier, measurement duration trigger code, measurement duration clarifying text
+79 SET FDA(SF,IENS,30)=MTTEXT
SET FDA(SF,IENS,31)=MTQUAL
SET FDA(SF,IENS,32)=MTCODE
SET FDA(SF,IENS,33)=MDCLTEXT
+80 DO CFDA^PSOERXIU(.FDA)
+81 DO UPDATE^DIE(,"FDA")
KILL FDA
+82 QUIT