Hoping this is a simple question. I haven't messed with subflows recently because they were tripping me up and here's what it boils down to.
1. I can pass in acquired resources, agnostic of what label they've been acquired to.
2. I can pass in references to resource activities, to be acquired in the subflow.
3. I can pass in a reference to the patient on a label of the token.
The issue I am having is what led me to do #3. When in the sub-flow I use a conditional statement that checks the value of a label on the patient (such as: patient.needsTransport) I get errors like these:
Flexscript ErrorMODEL:/Tools/ProcessFlow/PtFlow_Dev/Patient Needs Transport?~14>variables/decision Line 9Undefined variable patient being used. Flexscript ErrorMODEL:/Tools/ProcessFlow/PtFlow_Dev/Patient Needs Transport?~14>variables/decision Line 9Data type void does not support property needsTransport Flexscript ErrorMODEL:/Tools/ProcessFlow/PtFlow_Dev/Patient Needs Transport?~14>variables/decision Could not finish parsing because of previous errors
... which leads me to believe that the variable "patient" is not valid in the context of the subflow. I would think that I could access patient labels directly on the token by using that patient.___ syntax, since I can do that on the parent token, and I am able to access labels on the parent token.
What is the cleanest way to do this so that I don't have to store a reference to the patient in a label on the child token within the subflow?
I can provide an example if needed but I will have to take it out of context.