<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Command that returns patient destination? in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/command-that-returns-patient-destination/m-p/13489253#M7095</link>
    <description>&lt;PRE&gt;getdestination(patient)
&lt;/PRE&gt;&lt;P&gt;From the documentation for that command:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;H3&gt;Parameters&lt;/H3&gt;&lt;P&gt;(obj traveler, [num transferactivityID])&lt;/P&gt;&lt;H3&gt;Description&lt;/H3&gt;Gets the current, most recent, or pending destination of the traveler object. If the traveler is a patient, you should specify the activity ID number of the patient's transfer activity that you'd like to know the associated destination of. If the traveler is a patient and no transfer activity ID is specified, then the command will use the ID of the most recent activity started on the patient. If the traveler is a resource, rather than a patient, then the command assumes that the resource currently has an active task sequence containing a travel task, and it will use the most recent travel task (or if none have occured yet, the next pending travel task) to determine the destination.&lt;H3&gt;Example&lt;/H3&gt;&lt;P&gt;getdestination(patient, 100);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
    <pubDate>Thu, 13 Dec 2018 18:18:33 GMT</pubDate>
    <dc:creator>Matthew_Gillespie</dc:creator>
    <dc:date>2018-12-13T18:18:33Z</dc:date>
    <item>
      <title>Command that returns patient destination?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/command-that-returns-patient-destination/m-p/13489252#M7094</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim HC 5.3.0 ]&lt;/I&gt;&lt;/P&gt;&lt;P&gt;getname(patientlocation) is to get current patient location. May i know what is the function and variable to get patient destination in flexscipt?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2018 15:53:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/command-that-returns-patient-destination/m-p/13489252#M7094</guid>
      <dc:creator>jenric_ng</dc:creator>
      <dc:date>2018-12-13T15:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: Command that returns patient destination?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/command-that-returns-patient-destination/m-p/13489253#M7095</link>
      <description>&lt;PRE&gt;getdestination(patient)
&lt;/PRE&gt;&lt;P&gt;From the documentation for that command:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;H3&gt;Parameters&lt;/H3&gt;&lt;P&gt;(obj traveler, [num transferactivityID])&lt;/P&gt;&lt;H3&gt;Description&lt;/H3&gt;Gets the current, most recent, or pending destination of the traveler object. If the traveler is a patient, you should specify the activity ID number of the patient's transfer activity that you'd like to know the associated destination of. If the traveler is a patient and no transfer activity ID is specified, then the command will use the ID of the most recent activity started on the patient. If the traveler is a resource, rather than a patient, then the command assumes that the resource currently has an active task sequence containing a travel task, and it will use the most recent travel task (or if none have occured yet, the next pending travel task) to determine the destination.&lt;H3&gt;Example&lt;/H3&gt;&lt;P&gt;getdestination(patient, 100);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Thu, 13 Dec 2018 18:18:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/command-that-returns-patient-destination/m-p/13489253#M7095</guid>
      <dc:creator>Matthew_Gillespie</dc:creator>
      <dc:date>2018-12-13T18:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: Command that returns patient destination?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/command-that-returns-patient-destination/m-p/13489254#M7096</link>
      <description>&lt;P&gt;I am using HC 5.1.0. There is no getdestination function. Is there any method to get patient destination?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Dec 2018 01:31:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/command-that-returns-patient-destination/m-p/13489254#M7096</guid>
      <dc:creator>jenric_ng</dc:creator>
      <dc:date>2018-12-14T01:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: Command that returns patient destination?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/command-that-returns-patient-destination/m-p/13489255#M7097</link>
      <description>&lt;P&gt;Any advice on how to get destination for user of HC 5.1?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 00:12:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/command-that-returns-patient-destination/m-p/13489255#M7097</guid>
      <dc:creator>jenric_ng</dc:creator>
      <dc:date>2019-01-15T00:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: Command that returns patient destination?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/command-that-returns-patient-destination/m-p/13489256#M7098</link>
      <description>&lt;P&gt;The getdestination command handles a lot of different scenarios for you. I would recommend updating to the latest version (5.3.8) to take advantage of this feature and all the other bug fixes and features added in newer versions.&lt;/P&gt;&lt;P&gt;Otherwise you could try using these code snippets I pulled out of the body of that command.&lt;/P&gt;&lt;P&gt;If the activity is an escort or transport patient activity:&lt;/P&gt;&lt;PRE&gt;int activityRow = torownum(patient, activityID);
treenode destination = tonode(gettablevalue(var(patient, VAR_ActivityTable), activityRow, COL_ResourceDestinationName));&lt;/PRE&gt;&lt;P&gt;If the activity is a patient travels unattended activity:&lt;/P&gt;&lt;PRE&gt;treenode activets = gettasksequence(patient, 0);
// Loop through the tasks of the activets and if a travel task can be found, get its destination
int nrtasks = gettotalnroftasks(activets);

for (index = 1; index &amp;lt;= nrtasks; index++)
{
	if (gettasktype(activets, index) == TASKTYPE_TRAVEL)
	{
		destination = gettaskinvolved(activets, index, 1);
		break;
	}
}&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Jan 2019 01:02:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/command-that-returns-patient-destination/m-p/13489256#M7098</guid>
      <dc:creator>Matthew_Gillespie</dc:creator>
      <dc:date>2019-01-15T01:02:14Z</dc:date>
    </item>
  </channel>
</rss>

