Jump to content

Recommended Posts

Hi,

I'm having trouble with unit conversion when doing state assignments at a source. There are two different cases where this problem appears in the model:

  1. Subtracting TimeNow minus a Date Time state variable (ModelEntity.stWaitingListEntryDate)

image.png.0c0372f37145d1a93612c6c3caf38c8e.png

Although the specified unit for this property is 'Days', the assigned value is in hours and the unit is also 'Hours'. If I manually convert it by dividing by 24, the assigned value is in days, but the displayed unit is still ‘Hours’.  

image.png.228ed52a7d0231c4da440dd16a4794cb.png   image.png.8bda43dbe380e97e264b9f05da2d1eda.png 

  1. Unit conversion issue when assigning a new value to a state variable from a data table

image.png.e18fcf188d5516f0ca3da606e7ef1a95.png

Although the PatientsData.MaxWaitingTime is a real property with default unit ‘Days’, the assigned value to the state variable is converted to ‘Hours’. As in the first case, if I manually convert it by dividing by 24, the assigned value is in days, but the displayed unit is still ‘Hours’.

    image.png.a36bf68039a510ab4f8bec4f5a77e68e.png  image.png.0b4d09ded28d322f328dc718b127a0ed.png

In the attached model (time_units_conversion.spfx) you will find a simple example where you can see this in more detail.

Any suggestions to solve this issue will be highly appreciated.

Thank you and best regards,

Nicolina

Link to comment
Share on other sites

×
×
  • Create New...