arkhn / Cohort360

A web application to find patients, build cohorts and visualize data
Apache License 2.0
0 stars 0 forks source link

MedicationRequest mapping is broken #42

Closed MiskoG closed 3 years ago

MiskoG commented 3 years ago

Description ⁉️

Le mapping est cassé dans dosageInstruction.doseAndRate.doseQuantity.value --> parfois c'est une range (quand y'a un - dans la value) donc ça plante au loading dans hapi (reproductible dans la preview pyrog).

Comment reproduire 🗺

Le sauveur 👨🏻‍🚒

nriss commented 3 years ago

I see two possibilities:

The second point seems complex because:

I think I will go on the first option and work on that tomorrow, which looks to be the simplest.

I will also take this opportunity to modify by hand the d_* tables to correct automatic translation errors

nriss commented 3 years ago

SQL command to remove intervals and only keep the first number:

UPDATE prescriptions 
    SET dose_val_rx = regexp_replace(dose_val_rx, '-[0-9]+', '') 
    WHERE dose_val_rx LIKE '%-%';

This SQL request should be lauched every time we regenerate the db

elsiehoffet-94 commented 3 years ago

@nriss I agree that doing it in the db generation is the best way to proceed 👍

nriss commented 3 years ago

@simonvadee can we close this issue ?

And these ? https://github.com/arkhn/Cohort360/issues/40 https://github.com/arkhn/Cohort360/issues/41

simonvadee commented 3 years ago

yes!