vrijdag 4 juli 2014

Generate Process Mining XML format straight from SQL Server 2008

How to generate MXML straight from SQL Server 2008 !

Daan Blindeinformatiearchitect/BI-deskundige

Hello all,

I'd like to share my solution for creating PM-logs in mxml format straight from SQL Server.

The trick is to use the FOR XML PATH statement.

Consider you have a table with the following fields :
1. Event_key (e.g. DBCs_Key)
2. EventName (e.g. Closing DBC)
3. DateTime event 
3. Department

With the next SQL statement you can easily create the MXML output that is needed for PROM or other tools.


SELECT hdr.DBCs_Bkey as "@id"
,
(
SELECT 
EventName as "WorkflowModelElement"
,'Start' as EventType
,DateTimeEvent as "Timestamp"
,Department as "Originator"

FROM [ASZ_DBC_ProcesStappen] as dtl

WHERE dtl.DBCs_Bkey =hdr.DBCs_Bkey 

FOR XML PATH('AuditTrailEntry'),TYPE
)

FROM (SELECT DISTINCT dbcs_bkey FROM ASZ_DBC_ProcesStappen) as hdr

FOR XML PATH('ProcessInstance'),TYPE,ROOT('Process') 


This would give you the xml output as shown in the below link.

The only thing you have to add is the header info and a footer (if you are interested i can provide one) .

If you put the sql statement in a view or stored procedure you can easily filter the log with just SQL statements ! 

Some more screenshots of PROM visuals with the produced output you can find here : 
http://mijnpictures.blogspot.nl/2013/06/examples-prom-output-with-sql-produced.html

hope you enjoy this solution.
Daan Blinde


this is a copy of a forum article :
https://www.linkedin.com/groups/How-generate-MXML-straight-from-1915049.S.253072885?type=member&gid=1915049&view=&item=253072885

vrijdag 23 mei 2014

Hoe kun je Cognos rapporten voorzien van commentaar/documentatie ?

Regelmatig heb ik me afgevraagd hoe ik het beste mijn ‘ingewikkelde’ rapporten kan documenteren.
Handig voor eigen gebruik en voor je collega’s die een keer jouw rapport mogen aanpassen !

Nu maak ik vaak gebruik van hidden velden in het rapport maar in dit artikel worden nog een aantal andere suggesties gedaan :


Daarmee kom ik op de volgende 4 mogelijkheden:
  1.   Commentaar functie binnen een query item
  2.   Extra data-item aanmaken onder de naam ‘Rapport Documentatie’
  3.   Extra data-items aanmaken om zo de query-items in te delen
  4.   Hidden velden in het rapport 




voorbeeld van hidden tabel met de changelog van een rapport

donderdag 22 mei 2014

Visualizing processing time using simple Cognos chart


Each horizontal line is 1 specific patientcase. 
Each coloured dot represents one event (admission, surgery, discharge)
Along the y-axis where x=0 you can find each individual patientcase. 
The x-axis represents the duration in time as from the start-event.

The graph shows us that most of the surgeries are taking place within one day of the admission. Is also shows that more than half of the population stays 7 days or more in the hospital. There are a few patientcases with a duration of 20 days or longer.

Using a scatterplot it is simple to visualize the process times of a certain process. The most important clue is to plot the patientcases on the y-axis by giving them a number using a rank-formula. After that you can calculate the time between the starting event (admission) and the other events (surgery, discharge).

Using your imagination it is possible to make an interactive report (for example with Cognos Reports) in which the user can choose the starting event and the other events that must be plotted in the graph.
You can also add filters like gender, age, diagnosis, location etc.



















Hopefully this post is helpfull, if not you can always contact me!

Daan Blinde




Visualiseren van procestijden


Elke horizontale lijn is 1 specifieke patiencasus. De bolletjes staan elk voor 1 gebeurtenis (opname, operatie of ontslag). Langs de 0-lijn op de y-as staan de individuele patientcases, de x-as geeft de tijdsduur in dagen aan vanaf de eerste gebeurtenis (in dit geval de opname).

Hier is goed te zien dat het gros van de operaties (van een specifieke diagnose) plaatsvindt binnen 1 dag na de opname. Daarnaast valt op dat de helft van de patienten 7 dagen of langer in het ziekenhuis verblijft.
Met een aantal uitschieters van meer dan 20 dagen.

Door slim gebruik te maken van een standaard scatter plot is het redelijk eenvoudig procestijden te visualiseren. Het belangrijkste is om op de Y-as de individuele patientcases te plotten. Dit kan worden bereikt door de patientnummers een volgnummer (rank) te geven. Vervolgens kun je van de gebeurtenissen de tijd berekenen vanaf de eerste gebeurtenis.

Met een beetje fantasie maak je dan in (bijv.) Cognos een interactief rapport waarbij de gebruiker de keuze heeft welke gebeurtenis de referentie is en welke gebeurtenissen geplot worden in de grafiek.



Ik hoop dat deze post je verder helpt in het analyseren van processen.
Voel je vrij om contact met me op te nemen als je nog vragen hebt!

Daan Blinde


donderdag 5 december 2013

Voorbeeld infographic registratiegraad























Visualisatie van de registratie bij patienten van o.a. pijn na OK-metingen, ondervoedingscore, decubitus metingngen e.d.

(gebruik makend van een repeater-table in Cognos Report Studio)