Hi everyone !
I'm trying to analyze my PersonMilestones Table. I want to compare the Flexsim Model values with values that I have calculated in an Excel file. The common key should be a PatientID label.
I have tried to put it in "Name" in the source arrival or in a added label column (in case the former one did not work) :
However, that IDPatient does not appear in my PersonMilestones Table /
Thus, I have tried to add a column for a PatientID label but it does not work...
How can I add a label (here PatientID) to the PersonMilestones Table ? If it is not possible, then how can I access both the milestones values and the patient label at the same time ?
Thanks in advance,
Answer by Felix Möhlmann ·
Hi @Leah R,
there are two small errors in the screenshot of your attempt to add a column to the statistics collector. Instead of "current.PatientID" the Event value should read "data.person.PatientID" and, as your ID consists of text, the "Storage Type" should be set to "string".
I'm assuming you created that Statistics Collector by clicking on "Copy Internal Statistics Collector" on the PersonMilestones table, correct? This creates an entirely new collector with its own table which you can see by clicking on "View Table" in the "General" tab.
Sadly, the actual milestones are not properly linked to this copy of the internal collector, so the milestone columns don't show up in the table. This can however be manually fixed.
Open the table view of the PersonMilestones, right click and choose "Explore -> As Tree".
This opens the treenode of the internal collector. Expand the "stored" node and within it the "milestoneActivities" node. (There will probably be more entries than in the following example)
Now do the same with your copy of the milestone collector: Open the table view in the "General" tab by clicking on "View table" and open the tree as before.
Again expand the same nodes. You will notice that there are no subnodes to the "milestoneActivities" node.
Add one by selecting the node and pressing "Enter".
Now copy the first subnode from the internal collector and paste it into this new node (Select the original node and either use ctrl-c/ctrl-v or right click and choose "Edit" -> "Copy/Paste"). Repeat this until all subnodes are copied.
The copied milestone collector should now create the same table as the internal one with the added PatientID column.
I hope this works for you, too.
Answer by Jordan Johnson ·
Then, that label will appear in the PersonLabels table.
At that point, you can use a calculated table to add the IDPatient column to the PersonMilestones table. You can do that by "joining" the PersonMilestones table with the PersonLabels table on the PID column.