"add data" API to cross-check Analysis properties and show error if any mismatch
Initial request
Refer to related issue in Data Definition space. https://gitlab.opengroup.org/osdu/subcommittees/data-def/work-products/schema/-/issues/619
We need to have enough information in the catalog (Work-product-component) about what measurements to expect in the "content". Plus strict check (as we find in Wellbore DDMS) to show error when we try to use more fields (than stated in WPC) for "add content data" step. WPC also does not provide much clue about what to expect in the "content" - single-value, multi-value and so on.
For the NMR example, there are more details when we see JSON payload.
"AvailableSampleAnalysisProperties": [
"SamplesAnalysisID",
"SampleID",
"FreshState",
"FullBrineSaturation",
"PartialBrineSaturation",
"LiquidFilledPorosity",
"Porosity",
"EffectivePorosity",
"BVI",
"FFI",
"Swi",
"T2Cutoff"
],
Not quite Page-92 of sample Kentish report.
"Saturation": {
"Value": 100.0,
"UnitOfMeasure": "{{data-partition-id}}:reference-data--UnitOfMeasure:%25:"
},
"T2": {
"Value": 5.01,
"UnitOfMeasure": "{{data-partition-id}}:reference-data--UnitOfMeasure:ms:"
},
"Porosity": {
"Value": 0.136,
"UnitOfMeasure": "{{data-partition-id}}:reference-data--UnitOfMeasure:%25:"
}
},
Proposed Solution
Precondition: Content schema is recorded and existng SampleAnalysisID is defined in the content schema
- System counts the names of attributes, object names and array names specified in the content schema
- System drops duplicate names and updates AvailableSampleAnalysisProperties array in samplesanalysis record with names from content schema
- If array already included some values already, then they should preserve after update