David Price

Got well prroduction report working again

......@@ -3893,6 +3893,20 @@ mpr-tables:WellProductionFlows
[ sp:varName "productionFlowWhole"^^xsd:string
]
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/flow#SaleableFlow> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFlowWhole"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/flow#HydrocarbonAccountingFlow> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFlowWhole"^^xsd:string
]
])
] [ rdf:type sp:NotExists ;
sp:elements ([ sp:object <http://www.reportinghub.no/ep/schema/flow#FlowToSale> ;
sp:predicate rdf:type ;
sp:subject
......@@ -3931,40 +3945,33 @@ mpr-tables:WellProductionFlows
[ sp:varName "productionFlowMixedPart"^^xsd:string
]
] [ sp:object
[ sp:varName "productionFlowMixedPart"^^xsd:string
[ sp:varName "productFlowInMonthMaterial"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productFlowInMonth"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductFlow> ;
sp:predicate rdf:type ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#materialThatFlows> ;
sp:subject
[ sp:varName "productFlowInMonth"^^xsd:string
[ sp:varName "productionFlowMixedPart"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/core#PhysicalThingDuringOneMonth> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productFlowInMonth"^^xsd:string
[ sp:varName "productFlowInMonthMaterial"^^xsd:string
]
] [ sp:object
[ sp:varName "productFlowInMonthMaterial"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/flow#materialThatFlows> ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productFlowInMonth"^^xsd:string
[ sp:varName "quantityofmaterialinaspecifiedstate"^^xsd:string
]
] [ sp:object
[ sp:varName "productFlowWhole"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterial> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFlowMixedPart"^^xsd:string
[ sp:varName "quantityofmaterialinaspecifiedstate"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#WholeLifeProductFlow> ;
] [ sp:object <http://www.reportinghub.no/ep/schema/material#QuantityOfMaterialInASpecifiedState> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productFlowWhole"^^xsd:string
[ sp:varName "quantityofmaterialinaspecifiedstate"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
......@@ -4024,7 +4031,7 @@ mpr-tables:WellProductionFlows
])
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "productFlowInMonthMaterial"^^xsd:string
[ sp:varName "quantityofmaterialinaspecifiedstate"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
......@@ -4052,6 +4059,18 @@ mpr-tables:WellProductionFlows
[ sp:varName "volumeValueString"^^xsd:string
]
])
] [ sp:object
[ sp:varName "productFlowWhole"^^xsd:string
] ;
sp:predicate <http://www.reportinghub.no/ep/schema/core#temporalPartOf> ;
sp:subject
[ sp:varName "productionFlowMixedPart"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#WholeLifeProductFlow> ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productFlowWhole"^^xsd:string
]
] [ rdf:type sp:Optional ;
sp:elements ([ sp:object
[ sp:varName "productionFlowPurposeType"^^xsd:string
......@@ -4142,7 +4161,7 @@ mpr-tables:WellProductionFlows
] ;
sp:predicate rdf:type ;
sp:subject
[ sp:varName "productionFlowWhole"^^xsd:string
[ sp:varName "productionFlowMixedPart"^^xsd:string
]
] [ sp:object <http://www.reportinghub.no/ep/schema/flow#ProductionFlowDefinitionSubType> ;
sp:predicate rdf:type ;
......@@ -4159,7 +4178,7 @@ mpr-tables:WellProductionFlows
])
])
] ;
rhspin:tableHeaders ("Wellbore"^^xsd:string "Status"^^xsd:string "Purpose"^^xsd:string "Material"^^xsd:string "Volume"^^xsd:string "Days"^^xsd:string "Flow type"^^xsd:string "Flow subtype"^^xsd:string "Gross/Net"^^xsd:string) .
rhspin:tableHeaders ("Wellbore"^^xsd:string "Status"^^xsd:string "Purpose"^^xsd:string "Material"^^xsd:string "Volume"^^xsd:string "Day"^^xsd:string "Flow type"^^xsd:string "Flow subtype"^^xsd:string "Gross/Net"^^xsd:string) .
mpr-tables:WellTest
rdf:type rhspin:TableTemplate ;
......
......@@ -176,6 +176,9 @@ OPTIONAL {
<mprgswp:Table arg:report="{= ?report }" arg:template="mpr-tables:GasSales" />
<mprgswp:Table arg:report="{= ?report }" arg:template="mpr-tables:WellProductionFlows" />
<mprgswp:Table arg:report="{= ?report }" arg:template="mpr-tables:Cargo" />
......
......@@ -3,15 +3,13 @@ let:report="{# SELECT ?report WHERE { ?report a ep-report:MonthlyProductionRepor
let:activity="{# SELECT ?activity WHERE {?activity a ep-fac:TemporalPartOfAProductionFacility . ?report ep-report:reportOn ?activity}}"
let:activityEnd="{# SELECT ?activityEnd WHERE {?activity a ep-fac:TemporalPartOfAProductionFacility . ?report ep-report:reportOn ?activity . ?activity ep-activity:finishedAt ?activityEnd}}"
let:reportedFieldName="{# SELECT ?reportedFieldName
WHERE {
?report a ep-report:MonthlyProductionReportPartner .
?productVolumeReport ep-core:partOf ?report .
?productVolumeReport a ep-report:ProductVolumeReport .
?productVolumeReport ep-report:reportOn ?productionFlowsInReportingPeriod .
?productionFlowsInReportingPeriod a ep-flow:ProductionFlowNetwork .
?stateOfField ep-flow:facilityContainsFlow ?productionFlowsInReportingPeriod .
?stateOfField ep-core:temporalPartOf ?reportedField .
?reportedField npd:name ?reportedFieldName .
WHERE {
?report rdf:type ep-report:MonthlyProductionReportPartner .
?report ep-report:reportOn ?temporalpartofaproductionfacility .
?temporalpartofaproductionfacility rdf:type ep-fac:TemporalPartOfAProductionFacility .
?temporalpartofaproductionfacility ep-core:temporalPartOf ?productionfacility .
?productionfacility rdf:type ep-fac:Field .
?productionfacility npd:name ?reportedFieldName .
}}"
>
......