Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

Need to plot Output data for each patient "entity"

Hello All,

 

I have output data generated in a tablefile and I need to plot this data for each value generated in the "DT" column as shown in the attached pic. The chart plot the overall value but doesn't show the value for each MU. Please help me with this.

 

Mohamed Elshal

 

DT Plot.PNG

 

6 REPLIES

Re: Need to plot Output data for each patient "entity"

The chart category "Plotter" plots values over time. If you have all the values in a table and want to display this data instantaneously, you need to use the category "Chart".

Re: Need to plot Output data for each patient "entity"

The chart gives only the mean value. I doesn't plot each one

Re: Need to plot Output data for each patient "entity"

You could add a variable object to your model, called CurrentDT.  Then, each time you enter data into the DT column of your table, set CurrentDT to this same DT value.

 

Then add a chart object to your model.  The data source would be an Input Channel with CurrentDT specified in the associated Table File.  Set the Mode to Watch.  Also, on the Display tab, set category to Plotter and on the Axes tab, set the X range to be the length of your run.

 

This approach will plot each DT value as it is observed (by patient exit).

 

Re: Need to plot Output data for each patient "entity"

I believe what you proposed is the solution to my issue. Can you please help me with the code to add "CurrentDT". I am not experienced in accessing data in a tablefile.

 I have copied here the entrance strategy for the drain that I used to estimated the "DT".

 

is
do
local myPatient : string := to_str(@) ;

tab["Exit_Time",myPatient ] := EventController.Simtime ;

tab["DT",myPatient ] := tab["Exit_Time",myPatient ] - tab["Entrance_Time",myPatient ] ;


end;

Solution
Solution
Accepted by topic author Mohamed_Elshal
‎11-18-2016 03:23 PM

Re: Need to plot Output data for each patient "entity"

You can set CurrentDT in the same entrance control.  CurrentDT will be a variable of type time in the same frame as the drain object.

 

is
do
local myPatient : string := to_str(@) ;

tab["Exit_Time",myPatient ] := EventController.Simtime ;

tab["DT",myPatient ] := tab["Exit_Time",myPatient ] - tab["Entrance_Time",myPatient ] ;

 

CurrentDT := tab["DT",myPatient ];


end;

Re: Need to plot Output data for each patient "entity"

Thanks it works perfectly