Implement endpoints to support NMR data
Implement POST/api/rafs-ddms/samplesanalysis/{record_id}/data/nmr is implemented and available on Swagger
- record_id is the SamplesAnalysis WPC which was created previously
- User should be able to fill the SamplesAnalysis report with measurements taken in this analysis
- Successful response (200 status code) should update SamplesAnalysis record and include DDMSDatasets array with GET endpoint to the linked bulk data of nmr
- Validation cases should be covered with appropriate status codes
- Request & response structure should correspond to populated JSON
Implement GET/api/rafs-ddms/samplesanalysis/{record_id}/data/nmr endpoint is implemented and available on Swagger
- record_id is the SamplesAnalysis WPC
- User should be able to retrieve bulk data of NMR using new endpoint
- Successful response (200 status code) should retrieve all existing Fractionation Measurements (bulk data) linked to specified record id (SamplesAnalysis WPC)
- Validation cases should be covered with appropriate status codes
- Structure of request and response should correspond to populated JSON content schema
Example
"SamplesAnalysisID": "osdu:work-product-component--SamplesAnalysisID:dd76cf6c-226f-5636-ad1b-1ca0f8249cc8",
"SampleID": "osdu:master-data--Sample:88Y",
"FreshState": [
{
"LiquidFilledPorosity": {
"Value": "NULL",
"UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:%25"
},
"T2LogMean": {
"Value": "NULL",
"UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:ms"
}
}
],
"FullBrineSaturation": [
{
"Porosity": {
"Value": 28.12,
"UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:%25"
},
"EffectivePorosity": {
"Value": 28.35,
"UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:%25"
},
"T2LogMean": {
"Value": 158.1,
"UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:ms"
}
}
],
"PartialBrineSaturation": [
{
"BVI": {
"Value": 3.5,
"UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:%25"
},
"FFI": {
"Value": 27,
"UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:%25"
},
"Swi": {
"Value": 11,
"UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:%25"
},
"T2Cutoff": {
"Value": 33,
"UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:%25"
},
"IncrementalPorositySteps": [
{
"StepNumber": "1",
"Saturation": {
"Value": 100,
"UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:%25"
},
"T2": {
"Value": 0.150,
"UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:ms"
},
"Porosity": {
"Value": 0.507,
"UnitOfMeasure": "opendes:reference-data--UnitOfMeasure:%25"
}
}
]
}
}
Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"SamplesAnalysisID": {
"type": "string",
"pattern":"^[\\w\\-\\.]+:work-product-component\\-\\-SamplesAnalysis:[\\w\\-\\.\\:\\%]+:[0-9]*$"
},
"SampleID": {
"type": "string",
"pattern":"^[\\w\\-\\.]+:master-data\\-\\-Sample:[\\w\\-\\.\\:\\%]+:[0-9]*$"
},
"FreshState": {
"type": "array",
"items": {
"type": "object",
"properties": {
"LiquidFilledPorosity": {
"type": "object",
"properties": {
"Value": {
"type": "string"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"T2LogMean": {
"type": "object",
"properties": {
"Value": {
"type": "string"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
}
}
},
"FullBrineSaturation": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Porosity": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"EffectivePorosity": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"T2LogMean": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
}
}
}
},
"PartialBrineSaturation": {
"type": "array",
"items": {
"type": "object",
"properties": {
"BVI": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"FFI": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"Swi": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"T2Cutoff": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"IncrementalPorositySteps": {
"type": "array",
"items": {
"type": "object",
"properties": {
"StepNumber": {
"type": "string"
},
"Saturation": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"T2": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
},
"Porosity": {
"type": "object",
"properties": {
"Value": {
"type": "number"
},
"UnitOfMeasure": {
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-UnitOfMeasure:[\\w\\-\\.\\:\\%]+:[0-9]*$"
}
}
}
}
}
}
}
}
}
},
"required": ["SamplesAnalysisID"],
}
}
Edited by Siarhei Khaletski (EPAM)