Summary
This command converts a string to a date.
The first parameter is the string to convert to a date. The second parameter is date format, which is used to define the format. Consider using the command “datePath” before using this command.
Attributes
- none
Parameters
- one string command
Example
<script scriptId="absVal">
<body>
<s:alert>
<s:expression>
<s:or>
<s:not>
<s:isSet>
<s:question>
<s:question path=".hudt"/>
</s:question>
</s:isSet>
</s:not>
<s:not>
<s:isSet>
<s:question>
<s:question path=".hutime"/>
</s:question>
</s:isSet>
</s:not>
<s:not>
<s:isSet>
<s:question>
<s:question path=".fcon1dt"/>
</s:question>
</s:isSet>
</s:not>
<s:not>
<s:isSet>
<s:question>
<s:question path=".fcon1time"/>
</s:question>
</s:isSet>
</s:not>
<s:lte>
<s:abs>
<s:dateDiff unit="minute" method="integer">
<s:from>
<s:toDate>
<s:concat>
<s:toString>
<s:datePath type="date" path=".hudt:value"/>
<s:string value="MM/dd/yyyy"/>
</s:toString>
<s:string value=" " />
<s:toString>
<s:datePath type="date" path=".hutime:value"/>
<s:string value="HH:mm"/>
</s:toString>
</s:concat>
<s:string value="MM/dd/yyyy HH:mm" />
</s:toDate>
</s:from>
<s:to>
<s:toDate>
<s:concat>
<s:toString>
<s:datePath type="date" path=".fcon1dt:value"/>
<s:string value="MM/dd/yyyy"/>
</s:toString>
<s:string value=" " />
<s:toString>
<s:datePath type="date" path=".fcon1time:value"/>
<s:string value="HH:mm"/>
</s:toString>
</s:concat>
<s:string value="MM/dd/yyyy HH:mm" />
</s:toDate>
</s:to>
</s:dateDiff>
</s:abs>
<s:number value="240"/>
</s:lte>
</s:or>
</s:expression>
<s:correction>
<s:string value="optional"/>
</s:correction>
<s:text>
<s:string value="The absolute difference between the 'Holter Monitor
Hook-Up' and the 'First Contrast Injection' should be no more than 4 hours.
Please verify."/>
</s:text>
</s:alert>
</body>
<target typeId="fcon1time" when='preprocess' shouldReconcile='true'/>
<dependent path="/summary/ecgReport[n].hudt"/>
<dependent path="/summary/ecgReport[n].hutime"/>
<dependent path="/summary/ecgReport[n].fcon1dt"/>
</script>Need more help?
Please visit the Fountayn Contact Information page.