Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EMS: User needs ability/option to enter temperature in Celsius #252

Closed
francisli opened this issue Nov 18, 2022 · 4 comments · Fixed by #275
Closed

EMS: User needs ability/option to enter temperature in Celsius #252

francisli opened this issue Nov 18, 2022 · 4 comments · Fixed by #275
Assignees

Comments

@francisli
Copy link
Collaborator

No description provided.

@fwextensions
Copy link
Collaborator

Apparently, the EPCR software has fields for both C and F, and entering in one automatically calculates the other. The paramedic entered Celsius into Routed, even though the field is labeled with F.

@kretzbryan kretzbryan self-assigned this Feb 9, 2023
@francisli
Copy link
Collaborator Author

@fwextensions @kretzbryan So, the question has arisen on how we actually handle this in the data model...

Right now, the patientMetadata is used as a one-to-one mapping between a table column/model attribute/input field. For temperature, we have the temperature defined as a decimal field.

Ideally, we'd store both the temperature as a decimal field, and the unit (C or F) as some form of enumerated type field (i.e. temperatureUnit). By default, this would result in two controls being rendered into the form.

How can we special-case this so that, instead of showing a temperature decimal field and a unit field, we can show two separate inputs, one for F and one for C, and set the fields appropriately?

@francisli
Copy link
Collaborator Author

Alternatively, we always just convert to what we expect in the db, in this case, for legacy reasons, in F, and avoid adding a separate unit column.

@fwextensions
Copy link
Collaborator

fwextensions commented Feb 11, 2023

I think having a unit column adds unnecessary complexity, and possibly confusion if you're looking at just the temperature column, since the values will look wildly different.

Another way of mapping fields in the metadata would be to controls, rather than just types. So temperature could be a control type, which would get rendered as a pair of C and F fields in the UI. age might also be a special control, so it could render .5 as 6 months, for instance, without supporting arbitrary text entry. Fields without a control type specified could be rendered based on their value/column type.

@fwextensions fwextensions linked a pull request Mar 7, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants