Fern,
Populating base data, loading numeric values
Assuming that you are using the measurements table, I do the following:
- Place all raw values (“11”, “120”, “<2”, “5’3"”) from your source system into ‘value_source_value’ as strings
- Run SQL to populate the ‘value_as_number’ column if the ‘value_source_value’ is actually numeric (PostgreSQL example)
– set numeric values to value_as_number
update measurement
set value_as_number = CAST(M.value_source_value AS numeric)
from (
select distinct measurement_id, value_source_value, value_as_number
from public.measurement
WHERE value_source_value IS NOT NULL
AND value_as_number IS NULL
AND isnumeric(value_source_value)
) M
where measurement.measurement_id = M.measurement_id;
Mixed Unit of Measurements
Concerning height as 5’ 3", the source system is recording multiple measurement units into a single value. I prefer to create measurements that use a single unit of measure, leveraging metric units where possible, for my clients. This is the only way that we can conceptually map the measurement units into unit_concept_id.
Operators
operators such as <, >, >=, + cab be a problem. You can conceptually map the operator into operator_concept_id, but you cannot place it in a separate field using CMD v5 as there is no operator_source_value.
Bill