sfbrigade / bats-server

Routed is an app to help ambulances direct non-critical patients to hospital emergency rooms with the most availability.
https://routedapp.org/
GNU Affero General Public License v3.0
18 stars 11 forks source link

Consider using a composite field for vitals like blood pressue #273

Open fwextensions opened 1 year ago

fwextensions commented 1 year ago

Postgres has a notion of composite types that might better model some vitals like blood pressure, which always has two components. Right now, those are independent columns in the database, but it never makes sense to include a systolic pressure without a diastolic one, or vice versa. This would also make it easier to have a single "BP field" component that handles entry, rather than two independent input fields.

This could also be used for temperature, if we wanted to include the selection of units with the value.

fwextensions commented 1 year ago

This might make sense for the SpO2 field as well, since the Room Air and O2 sub-fields only apply when the O2 saturation has been filled in.