DailyDrillingReport.uispin.html 11.8 KB
<ui:group 
		let:activity="{# SELECT ?activity WHERE {?activity a ep-activity:DailyDrillingActivity . ?report ep-report:reportOn ?activity}}"
		let:wbPart="{# SELECT ?wbPart WHERE {?activity a ep-activity:DailyDrillingActivity . ?report ep-report:reportOn ?activity . ?activity ep-activity:onWellBore ?wbPart}}"
		let:wb="{# SELECT ?wb WHERE {?activity a ep-activity:DailyDrillingActivity . ?report ep-report:reportOn ?activity . ?activity ep-activity:onWellBore ?wbPart . ?wbPart ep-core:temporalPartOf ?wb}}"
		let:rig="{# SELECT ?rig WHERE {?activity a ep-activity:DailyDrillingActivity . ?report ep-report:reportOn ?activity . ?activity ep-activity:onRig/ep-core:temporalPartOf ?rig } }"
		let:firstActivity="{# SELECT ?firstActivity WHERE {?activity a ep-activity:DailyDrillingActivity . ?report ep-report:reportOn ?activity . ?activity ep-core:hasPart ?firstActivity . ?firstActivity a ep-activity:DrillingActivity . ?firstActivity ep-activity:startedAt ?startedAt} ORDER BY (?startedAt) LIMIT 1}"
		let:lastActivity="{# SELECT ?firstActivity WHERE {?activity a ep-activity:DailyDrillingActivity . ?report ep-report:reportOn ?activity . ?activity ep-core:hasPart ?firstActivity . ?firstActivity a ep-activity:DrillingActivity . ?firstActivity ep-activity:startedAt ?startedAt} ORDER BY DESC(?startedAt) LIMIT 1}" 
		let:statusActivity="{# SELECT ?statusActivity WHERE {?activity a ep-activity:DailyDrillingActivity . ?report ep-report:reportOn ?activity . ?activity ep-core:hasPart ?statusActivity . ?statusActivity a ep-activity:DailyDrillingActivityToStatus}}" 
		let:statusActivityWb="{# SELECT ?statusActivityWb WHERE {?activity a ep-activity:DailyDrillingActivity . ?report ep-report:reportOn ?activity . ?activity ep-core:hasPart ?statusActivity . ?statusActivity a ep-activity:DailyDrillingActivityToStatus . ?statusActivity ep-activity:onWellBore ?statusActivityWb}}" >
	<ui:group >
		<h1>Summary report Wellbore: {# SELECT ?wbName WHERE {?wb ep-core:name ?wbName}}</h1>
		<div>End time: {= ui:label(spl:object(?activity, ep-activity:finishedAt)) }</div>
		<hr /> 
		<table><tr>
			<td class="ddrSummaryLeft">
				<rhswp:NameValuePair arg:name="Report Number:" 				arg:value="{# SELECT ?repName WHERE {?report ep-core:name ?repName}}"  />
				<rhswp:NameValuePair arg:name="Wellbore:" 					arg:value="{# SELECT ?wbName WHERE {?wb ep-core:name ?wbName}}" />
				<rhswp:NameValuePair arg:name="Status:" 					arg:value="{# SELECT ?repTypeName WHERE {?report a ?repType . ?repType rdfs:label ?repTypeName}}" />
				<rhswp:NameValuePair arg:name="Operator:" 					arg:value="{# SELECT ?parentName WHERE {?activity ep-activity:drillingOperator ?opCo . ?opCo ep-core:temporalPartOf ?parentCo . ?parentCo ep-core:name ?parentName }}"  />
				<rhswp:NameValuePair arg:name="Rig name:" 					arg:value="{# SELECT ?rigName WHERE {?rig ep-core:npdName ?rigName}}"  />
				<rhswp:NameValuePair arg:name="Spud date:" 					arg:value="{# SELECT ?spudDate WHERE {?wb ep-well:wellBoreSpudAt ?spudDate}}"  />
				<rhswp:NameValuePair arg:name="Elevation RKB-MSL m:" 		arg:value="{# SELECT ?kellyElevMeas WHERE {?activity ep-activity:onRig ?rigState . ?rigState ep-core:hasPart ?kellyBushing . ?kellyBushing a ep-eqt:KellyBushing . ?kellyBushing ep-eqt:elevationOfKellyBushing ?kellyElev . ?kellyElev ep-core:metre ?kellyElevMeas}}" />
				<rhswp:NameValuePair arg:name="Tight well:" 				arg:value="{# SELECT ?wbTightTypeLabel WHERE { ?wb a ?wbTightType . ?wbTightType a ep-well:WellBoreTightnessType . ?wbTightType rdfs:label ?wbTightTypeLabel} }"  />
				<rhswp:NameValuePair arg:name="Pressure psig:" 				arg:value="{# SELECT ?buttHolePresVal WHERE {?statusActivityWb ep-well:averageBottomHolePressure ?buttHolePres . ?buttHolePres ep-core:undefinedScale ?buttHolePresVal}}" />
				<rhswp:NameValuePair arg:name="Fixed rig:" 					arg:value="{# SELECT ?rigTypeName WHERE {?rig a ?rigType . ?rigType rdfs:label ?rigTypeName . ?rigType rdfs:subClassOf ep-fac:Rig}}"  />
				<rhswp:NameValuePair arg:name="Depth at Kick Off mMD:" 		arg:value="{# SELECT ?koDepthM WHERE {?wb ep-core:hasPart ?koWb . ?koWb a ep-well:WellBoreKickOff . ?koWb ep-well:measuredDepth ?measDepth . ?measDepth ep-core:undefinedScale ?koDepthM}}" />
				<rhswp:NameValuePair arg:name="Plug Back Depth mMD:" 		arg:value="{# SELECT ?pbDepthVal WHERE {?statusActivityWb ep-well:measuredDepthOfPlugTop ?pbDepth . ?pbDepth ep-core:undefinedScale ?pbDepthVal}}" />
				<rhswp:NameValuePair arg:name="Penetration Rate m/h:" 		arg:value="{# SELECT ?penRateVal WHERE {?statusActivity ep-activity:finalRateOfDrilling ?penRate . ?penRate ep-core:undefinedScale ?penRateVal}}" />
				<rhswp:NameValuePair arg:name="Pressure Test Type:" 		arg:value="{# SELECT ?pTestActTypeText WHERE {?activity ep-core:hasPart ?pTestAct . ?pTestAct a ?pTestActType . ?pTestActType rdfs:subClassOf ep-activity:WellBorePressureTest . ?pTestActType rdfs:label ?pTestActTypeText}}" />
				<rhswp:NameValuePair arg:name="Depth At Formation Strength mMD:" arg:value="{# SELECT ?rockFormDepthMmdVal WHERE {?statusActivityWb ep-core:hasPart ?rockFormation . ?rockFormation a ep-well:SurroundingRockFormation . ?rockFormation ep-well:measuredDepth ?rockFormDepthMmd . ?rockFormDepthMmd ep-core:undefinedScale ?rockFormDepthMmdVal}}" />
				<rhswp:NameValuePair arg:name="Dia Last Casing In:" 		arg:value="{# SELECT ?lastCasingDiaVal WHERE {?statusActivityWb ep-core:hasPart ?lastCasing . ?lastCasing a ep-eqt:LastCasingOfAWellBore . ?lastCasing ep-eqt:outsideDiameterOfATubular ?lastCasingDia . ?lastCasingDia ep-core:undefinedScale ?lastCasingDiaVal}}"  />
				<rhswp:NameValuePair arg:name="Depth At Last Casing MTVD:" 	arg:value="{# SELECT ?lastCasingDepthTvdVal WHERE {?statusActivityWb ep-core:hasPart ?lastCasing . ?lastCasing a ep-eqt:LastCasingOfAWellBore . ?lastCasing ep-well:trueVerticalDepth ?lastCasingDepthTvd . ?lastCasingDepthTvd ep-core:undefinedScale ?lastCasingDepthTvdVal}}" />
			</td>
			<td class="ddrSummaryRight">
				<rhswp:NameValuePair arg:name="Period:" 					arg:value="{= fn:concat(ui:label(spl:object(?activity, ep-activity:startedAt)), ' - ', ui:label(spl:object(?activity, ep-activity:finishedAt))) }" />
				<rhswp:NameValuePair arg:name="Wellbore Id:" 				arg:value="{# SELECT DISTINCT ?wbID WHERE {?wb npd:id ?wbID}}" />
				<rhswp:NameValuePair arg:name="Created date:"				arg:value="{# SELECT ?createdAt WHERE {?report ep-report:createdAt ?createdAt}}" />
				<rhswp:NameValuePair arg:name="Drilling contractor:" 		arg:value="{# SELECT ?parentName WHERE {?activity ep-activity:drillingContractor ?contractor . ?contractor ep-core:temporalPartOf ?parentCo . ?parentCo ep-core:name ?parentName}}" />
				<rhswp:NameValuePair arg:name="NPD Rig Id:" 				arg:value="{= spl:object(?rig, ep-core:npdCode) }" />
				<rhswp:NameValuePair arg:name="Date Well Complete:" 		arg:value="{# SELECT ?completeDate WHERE {?wb ep-well:wellBoreCompletedAt ?completeDate}}"  />
				<rhswp:NameValuePair arg:name="Water depth MSL m:" 			arg:value="{# SELECT ?waterDepthVal WHERE {?activity ep-activity:onRig ?rigState . ?rigState a ep-fac:TemporalPartOfARig . ?rigState ep-core:hasPart ?water . ?water a ep-fac:SurroundingWater . ?water ep-fac:depthOfSurroundingWater ?waterDepth . ?waterDepth ep-core:undefinedScale ?waterDepthVal}}"  />
				<rhswp:NameValuePair arg:name="High pressure - High temperature:" arg:value="{# SELECT ?wbPTTypeLabel WHERE { ?wb a ?wbPTType . ?wbPTType a ep-well:WellBoreHphtType . ?wbPTType rdfs:label ?wbPTTypeLabel} }" />
				<rhswp:NameValuePair arg:name="Temperature degC:" 			arg:value="{# SELECT ?buttHoleTempVal WHERE {?statusActivityWb ep-well:averageBottomHoleTemperature ?buttHoleTemp . ?buttHoleTemp ep-core:undefinedScale ?buttHoleTempVal}}" />
				<rhswp:NameValuePair arg:name="Wellbore type:" 				arg:value="{# SELECT ?wbTypeName WHERE {?wb a ?wbType . ?wbType rdfs:label ?wbTypeName}}" />
				<rhswp:NameValuePair arg:name="Depth at Kick Off mTVD:" 	arg:value="{# SELECT ?koDepthT WHERE {?wb ep-core:hasPart ?koWb . ?koWb a ep-well:WellBoreKickOff . ?koWb ep-well:trueVerticalDepth ?measDepth . ?measDepth ep-core:undefinedScale ?koDepthT}}" />
				<rhswp:NameValuePair arg:name="Depth mMD:" 					arg:value="{# SELECT ?buttHoleMDVal WHERE {?statusActivityWb ep-well:finalBottomHoleMeasuredDepth ?buttHoleMD . ?buttHoleMD ep-core:undefinedScale ?buttHoleMDVal}}" />
				<rhswp:NameValuePair arg:name="Depth mTVD:" 				arg:value="{# SELECT ?buttHoleTVDVal WHERE {?statusActivityWb ep-well:finalBottomHoleTrueVerticalDepth ?buttHoleTVD . ?buttHoleTVD ep-core:undefinedScale ?buttHoleTVDVal}}" />
				<rhswp:NameValuePair arg:name="Dist Drilled m:" 			arg:value="{# SELECT ?distDrilledVal WHERE {?statusActivity ep-activity:distanceDrilled ?distDrilled . ?distDrilled ep-core:undefinedScale ?distDrilledVal}}" />
				<rhswp:NameValuePair arg:name="Hole Dia in:" 				arg:value="{# SELECT ?holeDiaVal WHERE {?statusActivityWb ep-core:hasPart ?lowerPartWb . ?lowerPartWb a ep-well:LowerPartOfAWellBore . ?lowerPartWb ep-well:nominalInsideDiameterOfBoreHole ?holeDia . ?holeDia ep-core:undefinedScale ?holeDiaVal}}"  />
				<rhswp:NameValuePair arg:name="Formation Strength g/cm3:" 		arg:value="{# SELECT ?rockFormStrengthVal WHERE {?statusActivityWb ep-core:hasPart ?rockFormation . ?rockFormation a ep-well:SurroundingRockFormation . ?rockFormation ep-well:strengthOfRockFormation ?rockFormStrength . ?rockFormStrength ep-core:undefinedScale ?rockFormStrengthVal}}"  />
				<rhswp:NameValuePair arg:name="Depth At Formation Strength mTVD:" arg:value="{# SELECT ?rockFormDepthTvdVal WHERE {?statusActivityWb ep-core:hasPart ?rockFormation . ?rockFormation a ep-well:SurroundingRockFormation . ?rockFormation ep-well:trueVerticalDepth ?rockFormDepthTvd . ?rockFormDepthTvd ep-core:undefinedScale ?rockFormDepthTvdVal}}" />
				<rhswp:NameValuePair arg:name="Depth At Last Casing mMD:" 	arg:value="{# SELECT ?lastCasingDepthMmdVal WHERE {?statusActivityWb ep-core:hasPart ?lastCasing . ?lastCasing a ep-eqt:LastCasingOfAWellBore . ?lastCasing ep-well:measuredDepth ?lastCasingDepthMmd . ?lastCasingDepthMmd ep-core:undefinedScale ?lastCasingDepthMmdVal}}" />
			</td>
		</tr></table>
	<hr />
		<h2>Summary of Activity (24 Hours)</h2>
		<p>{# SELECT ?summaryText WHERE {?statusActivity ep-activity:descriptionOfActivitiesWithinTheDailyReportingPeriod ?summaryText}}</p>
		<hr />
		<h2>Summary of Planned Activity (Next 24 Hours)</h2>
		<p>{# SELECT ?plannedText WHERE {?statusActivity ep-activity:descriptionOfActivitiesForecastForTheNextDailyReportingPeriod ?plannedText}}</p>
		
		
		<ddrswp:Table arg:report="{= ?report }" arg:template="ddr-tables:Operations" />
		
		<ddrswp:Table arg:report="{= ?report }" arg:template="ddr-tables:EquipmentFailure" />

		<ddrswp:Table arg:report="{= ?report }" arg:template="ddr-tables:BitRecord" />

		<ddrswp:Table arg:report="{= ?report }" arg:template="ddr-tables:CasingLinerTubingInformation" />

		<ddrswp:Table arg:report="{= ?report }" arg:template="ddr-tables:CementInformation" />

		<ddrswp:Table arg:report="{= ?report }" arg:template="ddr-tables:CementFluidInformation" />

		<ddrswp:Table arg:report="{= ?report }" arg:template="ddr-tables:PorePressure" />		

		<ddrswp:Table arg:report="{= ?report }" arg:template="ddr-tables:SurveyStation" />					

		<ddrswp:Table arg:report="{= ?report }" arg:template="ddr-tables:LogInformation" />

		<ddrswp:Table arg:report="{= ?report }" arg:template="ddr-tables:CoreInformation" />

		<ddrswp:Table arg:report="{= ?report }" arg:template="ddr-tables:WellTestInformation" />

		<ddrswp:Table arg:report="{= ?report }" arg:template="ddr-tables:FormationTest" />

		<ddrswp:Table arg:report="{= ?report }" arg:template="ddr-tables:StratigraphicInformation" />

		<ddrswp:Table arg:report="{= ?report }" arg:template="ddr-tables:LithologyInformation" />

		<ddrswp:Table arg:report="{= ?report }" arg:template="ddr-tables:WellControlIncident" />

		<ddrswp:Table arg:report="{= ?report }" arg:template="ddr-tables:PerforationInformation" />

		<ddrswp:Table arg:report="{= ?report }" arg:template="ddr-tables:GasReadingInformation" />

	</ui:group>
</ui:group>