Skip to content

Commit a103a54

Browse files
authored
Merge pull request #257 from answerdigital/feature/sact-provider-caresite-measurement
Added SACT - Provider, Care Site and Measurement
2 parents d939e99 + 818c73a commit a103a54

File tree

55 files changed

+1622
-7
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1622
-7
lines changed

OmopTransformer/OmopTransformer.csproj

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,21 @@
288288
<None Update="SACT\ConditionOccurrence\SactConditionOccurrence.xml">
289289
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
290290
</None>
291+
<None Update="SACT\Measurements\SactMeasurementHeight\SactMeasurementHeight.xml">
292+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
293+
</None>
294+
<None Update="SACT\Measurements\SactMeasurementWeightAtStartOfCycle\SactMeasurementWeightAtStartOfCycle.xml">
295+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
296+
</None>
297+
<None Update="SACT\Measurements\SactMeasurementWeightAtStartOfRegimen\SactMeasurementWeightAtStartOfRegimen.xml">
298+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
299+
</None>
300+
<None Update="SACT\Provider\SactProvider.xml">
301+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
302+
</None>
303+
<None Update="SACT\CareSite\SactCareSite.xml">
304+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
305+
</None>
291306
<None Update="SUS\AE\DeviceExposure\InvestigationDevice\SusAEInvestigationDevice.xml">
292307
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
293308
</None>

OmopTransformer/OxfordGP/VisitDetail/OxfordGPVisitDetail.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,8 @@ order by
1919
<Explanation columnName="EventDate">
2020
<Description>Event date</Description>
2121
</Explanation>
22+
<Explanation columnName="GPEventsPrimaryKey">
23+
<Description>GP Events Unique ID</Description>
24+
</Explanation>
2225
</Explanations>
2326
</Query>

OmopTransformer/OxfordGP/VisitOccurrence/OxfordGPVisitOccurrence.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ internal class OxfordGPVisitOccurrence : OmopVisitOccurrence<OxfordGPVisitOccurr
2727
[ConstantValue(32818, "`EHR administration record`")]
2828
public override int? visit_type_concept_id { get; set; }
2929

30-
3130
[CopyValue(nameof(Source.GPEventsPrimaryKey))]
3231
public override string? RecordConnectionIdentifier { get; set; }
3332
}

OmopTransformer/OxfordGP/VisitOccurrence/OxfordGPVisitOccurrence.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,8 @@ order by
1919
<Explanation columnName="EventDate">
2020
<Description>Event date</Description>
2121
</Explanation>
22+
<Explanation columnName="GPEventsPrimaryKey">
23+
<Description>GP Events Unique ID</Description>
24+
</Explanation>
2225
</Explanations>
2326
</Query>

OmopTransformer/OxfordPrescribing/DrugExposureWithSnomed/OxfordPrescribingDrugExposureWithSnomed.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,8 @@ where concept_identifier is not null
4343
<Explanation columnName="strengthdose">
4444
<Description>The unit of the drug dose</Description>
4545
</Explanation>
46+
<Explanation columnName="EVENT_ID">
47+
<Description>The unique ID of the Event</Description>
48+
</Explanation>
4649
</Explanations>
4750
</Query>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using OmopTransformer.Annotations;
2+
using OmopTransformer.Omop.CareSite;
3+
4+
namespace OmopTransformer.SACT.CareSite;
5+
6+
internal class SactCareSite : OmopCareSite<SactCareSiteRecord>
7+
{
8+
[CopyValue(nameof(Source.Organisation_Identifier_Code_Of_Provider))]
9+
public override string? care_site_name { get; set; }
10+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<Query>
2+
<Sql>
3+
select distinct
4+
Organisation_Identifier_Code_Of_Provider
5+
from omop_staging.sact_staging
6+
</Sql>
7+
<Explanations>
8+
<Explanation columnName="Organisation_Identifier_Code_Of_Provider">
9+
<Description>ORGANISATION SITE CODE of the ORGANISATION where the PATIENT was treated</Description>
10+
<Origin>ORGANISATION IDENTIFIER (CODE OF PROVIDER)</Origin>
11+
</Explanation>
12+
</Explanations>
13+
</Query>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using OmopTransformer.Annotations;
2+
3+
namespace OmopTransformer.SACT.CareSite;
4+
5+
[DataOrigin("SACT")]
6+
[Description("SACT Inpatient Care Site")]
7+
[SourceQuery("SactCareSite.xml")]
8+
internal class SactCareSiteRecord
9+
{
10+
public string? Organisation_Identifier_Code_Of_Provider { get; set; }
11+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using OmopTransformer.Annotations;
2+
using OmopTransformer.Omop.Measurement;
3+
using OmopTransformer.Transformation;
4+
5+
namespace OmopTransformer.SACT.Measurements.SactMeasurementHeight;
6+
7+
internal class SactMeasurementHeight : OmopMeasurement<SactMeasurementHeightRecord>
8+
{
9+
[CopyValue(nameof(Source.NHS_Number))]
10+
public override string? nhs_number { get; set; }
11+
12+
[Transform(typeof(DateConverter), nameof(Source.Start_Date_Of_Regimen))]
13+
public override DateTime? measurement_date { get; set; }
14+
15+
[Transform(typeof(DateConverter), nameof(Source.Start_Date_Of_Regimen))]
16+
public override DateTime? measurement_datetime { get; set; }
17+
18+
[ConstantValue(32828, "EHR episode record")]
19+
public override int? measurement_type_concept_id { get; set; }
20+
21+
[Transform(typeof(DoubleParser), nameof(Source.Height_At_Start_Of_Regimen))]
22+
public override double? value_as_number { get; set; }
23+
24+
[CopyValue(nameof(Source.Height_At_Start_Of_Regimen))]
25+
public override string? value_source_value { get; set; }
26+
27+
[ConstantValue(8582, "cm")]
28+
public override int? unit_concept_id { get; set; }
29+
30+
[ConstantValue(607590, "Body Height")]
31+
public override int[]? measurement_concept_id { get; set; }
32+
33+
public override bool IsValid => base.IsValid && value_as_number != null;
34+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<Query>
2+
<Sql>
3+
select distinct
4+
NHS_Number,
5+
Height_At_Start_Of_Regimen,
6+
Start_Date_Of_Regimen
7+
from omop_staging.sact_staging
8+
</Sql>
9+
<Explanations>
10+
<Explanation columnName="NHS_Number">
11+
<Description>Patient NHS Number</Description>
12+
<Origin>NHS NUMBER</Origin>
13+
</Explanation>
14+
<Explanation columnName="Height_At_Start_Of_Regimen">
15+
<Description>Height when the treatment started</Description>
16+
<Origin>HEIGHT AT START OF TREATMENT</Origin>
17+
</Explanation>
18+
<Explanation columnName="Start_Date_Of_Regimen">
19+
<Description>Date the Regiment started</Description>
20+
<Origin>START DATE OF REGIMEN</Origin>
21+
</Explanation>
22+
</Explanations>
23+
</Query>

0 commit comments

Comments
 (0)