
Question/Guidance

Resolution: Resolved

Moderate

None

None

CMS0156v11

Hi Team,
Below mentioned are functions from CMS156v11:
CMD.CodeToDaily(Frequency Code)
case
when Frequency ~ "Once daily (qualifier value)" then 1.0
when Frequency ~ "Twice a day (qualifier value)" then 2.0
when Frequency ~ "Three times daily (qualifier value)" then 3.0
when Frequency ~ "Four times daily (qualifier value)" then 4.0
when Frequency ~ "Every twenty four hours (qualifier value)" then 1.0
when Frequency ~ "Every twelve hours (qualifier value)" then 2.0
when Frequency ~ "Every thirty six hours (qualifier value)" then 0.67
when Frequency ~ "Every eight hours (qualifier value)" then 3.0
when Frequency ~ "Every four hours (qualifier value)" then 6.0
when Frequency ~ "Every six hours (qualifier value)" then 4.0
when Frequency ~ "Every seventy two hours (qualifier value)" then 0.34
when Frequency ~ "Every forty eight hours (qualifier value)" then 0.5
when Frequency ~ "Every eight to twelve hours (qualifier value)" then 2.0
when Frequency ~ "Every six to eight hours (qualifier value)" then 3.0
when Frequency ~ "Every three to four hours (qualifier value)" then 6.0
when Frequency ~ "Every three to six hours (qualifier value)" then 4.0
when Frequency ~ "Every two to four hours (qualifier value)" then 6.0
when Frequency ~ "One to four times a day (qualifier value)" then 4.0
when Frequency ~ "One to three times a day (qualifier value)" then 3.0
when Frequency ~ "One to two times a day (qualifier value)" then 2.0
when Frequency ~ "Two to four times a day (qualifier value)" then 4.0
else null
end
CMD.QuantityToDaily(Frequency Quantity)
case Frequency.unit
when 'h' then (24.0 / Frequency.value)
when 'min' then (24.0 / Frequency.value) * 60
when 's' then (24.0 / Frequency.value) * 60 * 60
when 'd' then (24.0 / Frequency.value) / 24
when 'wk' then (24.0 / Frequency.value) / (24 * 7)
when 'mo' then (24.0 / Frequency.value) / (24 * 30) /* assuming 30 days in month */
when 'a' then (24.0 / Frequency.value) / (24 * 365) /* assuming 365 days in year */
when 'hour' then (24.0 / Frequency.value)
when 'minute' then (24.0 / Frequency.value) * 60
when 'second' then (24.0 / Frequency.value) * 60 * 60
when 'day' then (24.0 / Frequency.value) / 24
when 'week' then (24.0 / Frequency.value) / (24 * 7)
when 'month' then (24.0 / Frequency.value) / (24 * 30) /* assuming 30 days in month */
when 'year' then (24.0 / Frequency.value) / (24 * 365) /* assuming 365 days in year */
when 'hours' then (24.0 / Frequency.value)
when 'minutes' then (24.0 / Frequency.value) * 60
when 'seconds' then (24.0 / Frequency.value) * 60 * 60
when 'days' then (24.0 / Frequency.value) / 24
when 'weeks' then (24.0 / Frequency.value) / (24 * 7)
when 'months' then (24.0 / Frequency.value) / (24 * 30) /* assuming 30 days in month */
when 'years' then (24.0 / Frequency.value) / (24 * 365) /* assuming 365 days in year */
else null
end
CMD.ToDaily(Frequency Choice<Quantity, Code>)
case
when Frequency is Quantity then QuantityToDaily(Frequency as Quantity)
else CodeToDaily(Frequency as Code)
end
Query 1:
For CMD.CodeToDaily(Frequency Code):
For example:
when Frequency ~ "Once daily (qualifier value)" then 1.0
code "Once daily (qualifier value)" ("SNOMEDCT Code (229797004)")
If we are getting a numeric value for frequency from client, is it necessary to use the above mentioned SNOMEDCT code ?
Query 2:
CMD.QuantityToDaily(Frequency Quantity)
Need more understanding of this functionality.
For example:
when 'h' then (24.0 / Frequency.value)
How to interpret this. How to calculate Frequency.value here?
Request you to provide us with the resolution urgently as our client deliverables are dependent on it.