Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a mapping load, which looks like the following.
MapDRG795Exclusion:
MAPPING LOAD * INLINE [
IPOPServiceLine, Exclusion
I795, 0
];
My apply map looks like the following:
APPLYMAP('MapDRG795Exclusion',IPOPServiceCode,1) AS CasesExcNB795IND,
This will display a 0 for false to exclude for 1 for true to exclude. I'd like to use the dual function to display a Yes for True and a No for False, while still holding the value of 0 and 1. How does the syntax work with applymap and dual?
Hi,
one suggestion:
MapDRG795Exclusion:
MAPPING
LOAD IPOPServiceLine,
Dual('No',Exclusion)
INLINE [
IPOPServiceLine, Exclusion
I795, 0
];
table1:
LOAD RecNo() as ID,
IPOPServiceCode,
APPLYMAP('MapDRG795Exclusion',IPOPServiceCode,Dual('Yes',1)) AS CasesExcNB7
INLINE [
IPOPServiceCode
I791
I792
I793
I794
I795
I796
I797
I798
I799
];
hope this helps
regards
Marco
Try this...
MapDRG795Exclusion:
MAPPING LOAD * INLINE [
IPOPServiceLine, Exclusion
I795, dual('No', 0)
];
APPLYMAP('MapDRG795Exclusion',IPOPServiceCode, dual('Yes'),1)) AS CasesExcNB795IND,
The APPLYMAP part is correct, but the mapping load displays the text dual('No') instead of applying the dual. Is it possible to do a dual on the mapping load?
Hi,
one suggestion:
MapDRG795Exclusion:
MAPPING
LOAD IPOPServiceLine,
Dual('No',Exclusion)
INLINE [
IPOPServiceLine, Exclusion
I795, 0
];
table1:
LOAD RecNo() as ID,
IPOPServiceCode,
APPLYMAP('MapDRG795Exclusion',IPOPServiceCode,Dual('Yes',1)) AS CasesExcNB7
INLINE [
IPOPServiceCode
I791
I792
I793
I794
I795
I796
I797
I798
I799
];
hope this helps
regards
Marco
The mapping table I posted was incorrect. This will work.
MapDRG795Exclusion:
MAPPING LOAD
IPOPServiceLine,
dual('No',0) as Exclusion
INLINE [
IPOPServiceLine
I795
];
APPLYMAP('MapDRG795Exclusion',IPOPServiceCode, dual('Yes'),1)) AS CasesExcNB795IND,
just for fun another one without mapping:
tabDRG795Exclusion:
LOAD * INLINE [
IPOPServiceLineExcl
I795
I797
];
table1:
LOAD RecNo() as ID,
IPOPServiceCode,
If(Exists(IPOPServiceLineExcl,IPOPServiceCode),Dual('No',0),Dual('Yes',1)) as CasesExcNB7
INLINE [
IPOPServiceCode
I791
I792
I793
I794
I795
I796
I797
I798
I799
];
hope this helps
regards
Marco
There is a huge performance hit when using IF in the load. That is the reason I went with a mapping load.
Thanks
regards
Marco