Upload
sygladiator
View
26
Download
0
Embed Size (px)
DESCRIPTION
cognos MD functions
Citation preview
Apply group security :
Create a query having data item
Dataitem1: -- #sq(CSVIdentityNameList ())#
Then create a Boolean variable :--
[Group security].[Data Item1] not contains 'CO_excl'
Then attach page with the above query then add dataitem in report properties:
Then apply render variable on the block to hide
Automatic Default value selection in prompt using javascript
<script type="text/javascript">
var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms["formWarpRequest"]);
if (fW)
{
listBoxprompt_month.selectAll();
listBoxStart.selectAll();
listBoxEnd.selectAll();
if (fW.elements["cv.id"].value == "RS")
setTimeout('oCVRS.promptAction(\'finish\')', 5000);
else
setTimeout('oCV_NS_.promptAction(\'finish\')', 5000);
}
</script>
Restrict hierarchy in prompt:
Data Item1: ordinal(level(currentMember([Orthoval_Periop].[Partner].[Partner])))
Data Item1<4
Default view is at Level having some set of members and report drill level sud change according to prompt level selected:
Default set:
head(children([Inpatient]), if(caption(item(set([Orthoval_Fin].[Clinical_Grouping].[Clinical_Grouping].[Clinical_Grouping]->?p_CLGroup?),0))=caption([Clinical_Grouping])) then (count (1 within set(children([Inpatient])))) else (0))
Prompt Set
head([Clinical Grouping prompt], if(caption(item(set([orthoval_CO].[Clinical_Grouping].[Clinical_Grouping].[Clinical_Grouping]->?p_CLGrouping?),0))=caption([Clinical_Grouping])) then(0) else(count (1 within set([Clinical Grouping prompt]))) )
Union –Used in Report
union([Default set],[Prompt set])
Prompt Default level
ClinicalGrouping
Security Working for multiple user
caption([Orthoval_Fin].[Partner].[Partner].[locationName])
in
(if((#sq($account.parameters.Location)#)='All')
then(caption([Orthoval_Fin].[Partner].[Partner].[locationName]))
else(#sq($account.parameters.Location)#)
)
Filter to filter the value passed from DMR report to relational Report:To Handle Top level and various drill levels.
Paramter value is passed in drill through.
(
([Orthoval_Dev].[viewcorollupreporting].[systemName]
in
(if(?p_level1?='Partner')
then([Orthoval_Dev].[viewcorollupreporting].[systemName])
else(?p_level1?)))
OR
([Orthoval_Dev].[viewcorollupreporting].[locationName]
in
(if(?p_level2?='Partner')
then([Orthoval_Dev].[viewcorollupreporting].[locationName])
else(?p_level2?))
)
)
Applying Slicer:based on filter selected
set([Orthoval_Fin].[Partner].[Partner].[Partner]->?p_partner?)
Dragging hierarchy in prompt will generate tree prompt while Dragging the level will generate value prompt.
To change the default auto generated prompt type ,change the property in FM over that particular dataitem.Select prompt type
Last 12 months:
lastPeriods(12,[Orthoval_Fin].[Discharge_Date_Month_level].[Discharge_Date_Month_level]-> ?p_Time?)
Previous year last 12 month Volume
tuple(parallelPeriod([Orthoval_Fin].[Discharge_Date_Month_level].[Discharge_Date_Month_level].[Year],1,currentMember(hierarchy([Last 12 months]))),[Volume])
Current year last 12 months volume
tuple(currentMember(hierarchy([Last 12 months])),[Volume])
Top 10 Payor
Dataitem Top9payer=topCount([Payor Mix],9,[Volume])
Dataitem Desc= descendants([Orthoval_Fin].[Payer].[Payer].[Payer],1)
Dataitem TotalVol= total([Volume] within set([Payor Mix]))
Calculated Member Payors=union([Top 9 Payors],[Others])
Set expression Others=[Total Vol]-total([Volume] within set([Top 9 Payors]))
Set expression payorMix=union ([Default Set],[Prompt Set])
Set expression Prompt set= head([Selected Payor], if(caption(item([Selected Payor],0))=caption([Payer])) then (0) else(count(1 within set([Selected Payor]))))
Set expression Default set= head([Desc],if(caption(item([Selected Payor],0))=caption([Payer])) then (count(1 within set(descendants([Selected Payor],1)))) else (0))
LOS trend
LOS Bucket
set(member(total(currentMeasure within set filter([LOS desc],caption(currentMember(hierarchy([Orthoval_Fin].[LOS Bucket].[LOS Bucket].[LOS Bucket]))) in ('1','2'))),'1-2','1-2',hierarchy([Orthoval_Fin].[LOS Bucket].[LOS Bucket].[LOS Bucket])),
member(total(currentMeasure within set filter([LOS desc],caption(currentMember(hierarchy([Orthoval_Fin].[LOS Bucket].[LOS Bucket].[LOS Bucket]))) ='3')),'3','3',hierarchy([Orthoval_Fin].[LOS Bucket].[LOS Bucket].[LOS Bucket])),
member(total(currentMeasure within set filter([LOS desc],caption(currentMember(hierarchy([Orthoval_Fin].[LOS Bucket].[LOS Bucket].[LOS Bucket]))) ='4')),'4','4',hierarchy([Orthoval_Fin].[LOS Bucket].[LOS Bucket].[LOS Bucket])),
member(total(currentMeasure within set filter([LOS desc],caption(currentMember(hierarchy([Orthoval_Fin].[LOS Bucket].[LOS Bucket].[LOS Bucket]))) ='5')),'5','5',hierarchy([Orthoval_Fin].[LOS Bucket].[LOS Bucket].[LOS Bucket])),
member(total(currentMeasure within set filter([LOS desc],caption(currentMember(hierarchy([Orthoval_Fin].[LOS Bucket].[LOS Bucket].[LOS Bucket]))) ='6')),'6','6',hierarchy([Orthoval_Fin].[LOS Bucket].[LOS Bucket].[LOS Bucket])),
member(total(currentMeasure within set filter([LOS desc],caption(currentMember(hierarchy([Orthoval_Fin].[LOS Bucket].[LOS Bucket].[LOS Bucket]))) ='7')),'7','7',hierarchy([Orthoval_Fin].[LOS Bucket].[LOS Bucket].[LOS Bucket])),
member(total(currentMeasure within set filter([LOS desc],caption(currentMember(hierarchy([Orthoval_Fin].[LOS Bucket].[LOS Bucket].[LOS Bucket]))) not in ('1','2','3','4','5','6','7'))),'>7','>7',hierarchy([Orthoval_Fin].[LOS Bucket].[LOS Bucket].[LOS Bucket]))
)
Difference between Automatic summary and Total
Automatic summary calculates the summarize row according to the data item for example some dataitem is average then summary will also be average but total will sum up the averages in all rows.
CYTD
periodsToDate ([Orthoval_Fin].[Discharge_Date_Month_level].[Discharge_Date_Month_level].[Year], [Selected Time])
PYTD
periodsToDate ([Orthoval_Fin].[Discharge_Date_Month_level].[Discharge_Date_Month_level].[Year],parallelPeriod ([Orthoval_Fin].[Discharge_Date_Month_level].[Discharge_Date_Month_level].[Year],1,[Selected Time]))
Current Range from Calender
intersect(lastPeriods(-9999, #'[Orthoval_Fin].[Discharge_Date].[Discharge_Date].[Date]->:[PC].[@MEMBER].['+substitute('-','',substitute('-','',prompt('p_startDate','date')))+']'#),
lastPeriods(9999, #'[Orthoval_Fin].[Discharge_Date].[Discharge_Date].[Date]->:[PC].[@MEMBER].['+substitute('-','',substitute('-','',prompt('p_endDate','date')))+']'#))
Pre Start Range
lastPeriods (-9999,parallelPeriod ([Orthoval_Fin].[Discharge_Date].[Discharge_Date].[Year],1,#'[Orthoval_Fin].[Discharge_Date].[Discharge_Date].[Date]->:[PC].[@MEMBER].['+substitute('-','',substitute('-','',prompt('p_startDate','date')))+']'#))
PreEnd Range
lastPeriods (9999,parallelPeriod ([Orthoval_Fin].[Discharge_Date].[Discharge_Date].[Year],1,#'[Orthoval_Fin].[Discharge_Date].[Discharge_Date].[Date]->:[PC].[@MEMBER].['+substitute('-','',substitute('-','',prompt('p_endDate','date')))+']'#))
Pre Range
intersect ([prestart range],[preend range])
Current time period
#'[Orthoval_Fin].[Discharge_Date].[Discharge_Date].[Month]->:[PC].[@MEMBER].['+timestampMask(_first_of_month($current_timestamp),'yyyymmdd')+'-'+timestampMask(_last_of_month($current_timestamp),'yyyymmdd')+']'#
Physician Report
Top 5 surgeon by vol
topCount ([Orthoval_Fin].[Physician].[Physician].[physicianGroup],5,total([Volume] within set([Orthoval_Fin].[Discharge_Date].[Discharge_Date].[Discharge_Date]->?p_Time?)))
Perioperative Dashboard
Macros :
#sq(csv(split('/',prompt('p_startDate'))))#
#substitute(''','',substitute('-','',substitute('-','',prompt('p_startDate')))))#
(Relational Report )Pateint Detail Report (Drill from Dimensional Report)
Start:
cast(cast(reverse(substring(reverse(?p_dte?),[Data Item2],8)),integer), date)
End:
cast(cast(reverse(substring(reverse(?p_dte?),2,8)),integer), date)
Dataitem2:
position('-',reverse(?p_dte?))+1
Filter;
[dischargeDate] >=[Start]
[dischargeDate] <=[End]
(?p_section? in ('Overall')) OR ([Proceduralgrouping] in (?p_section?)) OR ((?p_section? in ('Joint Only')) AND ([Proceduralgrouping] in ('Hip','Knee')))
Clinical grpinng filter:
(
(?p_clinical_grp? in ('Clinical_Grouping'))
OR
([patientTypeDesc] in (?p_clinical_grp?))
OR
([categoryDescription] in (?p_clinical_grp?))
OR
([baseDRGDesc] in (?p_clinical_grp?))
OR
([drgId] in (?p_clinical_grp?))
OR
( ([icdCode] in (?p_clinical_grp?)) AND ([drgId] in ([drg Parent uniq name])) ) ---done since icdcode are present in multiple drgid.
)
drg Parent uniq name-- reverse(substring(reverse(substring(?p_drgid?,81,200)),2,200))
Partner Filter:
(
((?p_partner? in ('Partner'))OR ([systemName] in (?p_partner?)) OR ([systemName] is Null))
OR
(([locationName]='Partner')OR ([locationName] in (?p_partner?)) OR ([locationName] is Null))
)
Javascript to restrict user from selecting same values in two different value prompt;
<script>
function compareSurveys()
{
var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms["formWarpRequest"]);
if(fW)
{
var survey1=fW._oLstChoicesSurvey1.value;
var survey2=fW._oLstChoicesSurvey2.value;
var survey3=fW._oLstChoicesSurvey3.value;
var survey4=fW._oLstChoicesSurvey4.value;
if((survey1==survey2)||(survey1==survey3)||(survey1==survey4)||(survey2==survey3)||(survey2==survey4)||(survey3==survey4))
{
alert("Please select different surveys");
promptButtonReprompt();
}
else
{
promptButtonFinish();
}
}
}
</script>
<div onmousedown=compareSurveys()> Finish button </div>
Tree prompt and value prompt used simultaneously for default value selection and hide the tree prompt.
Javascript to hide columns beside dataitem on click over data item
<script>
function hideFunc()
{
var el=document.getElementById('A');
var tbl=el.parentElement.parentElement.parentElement.parentElement;
var rows = tbl.getElementsByTagName('tr');
for(i=0;i<rows.length;i++)
{
var cels = rows[i].getElementsByTagName('td')
if(i>0)
{
if (cels[8].style.display=="none")
{
cels[8].style.display= "block";
cels[9].style.display= "block";
}
else{
cels[8].style.display= "none"
cels[9].style.display= "none";
}
}
else{
if (cels[7].style.display=="none")
{
cels[7].style.display= "block";
cels[8].style.display= "block";
}
else{
cels[7].style.display= "none"
cels[8].style.display= "none";
}
}
}
return false;
}
hideFunc()
</script>
Default selection in case of Dashboard design is very important:-
1.To provide default selection of system name and for all location ,apply cascading. with location name as optional parameter. And filters of both as system as required and location as optional