Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update bundle and processing #83

Merged
merged 25 commits into from
Nov 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
279d081
Rename sample bundle
stefpiatek Oct 10, 2022
4b7e371
Reorder and trim down bundle to match new version more easily
stefpiatek Oct 10, 2022
89e4341
Add eze's newest example bundle
stefpiatek Oct 10, 2022
a921b10
Update example bundle based on review discussion
stefpiatek Oct 25, 2022
ac16c2b
Add sample authorised datetime
stefpiatek Oct 28, 2022
63afe64
Add report finding options
stefpiatek Oct 28, 2022
de025ea
Add authoriser to service request
stefpiatek Oct 28, 2022
658858c
Remove prefix
stefpiatek Oct 28, 2022
2828486
Add genes tested to form
stefpiatek Oct 28, 2022
d9c4156
Ensure transcript is in cDNA change
stefpiatek Oct 28, 2022
5daa49e
Require mrn or NHS number and use specific systems
stefpiatek Oct 28, 2022
4bffb41
Add issuer to practitioner
stefpiatek Oct 28, 2022
9ac3f81
Remove unnecessary field
stefpiatek Oct 28, 2022
e29e708
Update bundle
stefpiatek Oct 28, 2022
79df636
Update bundle to use practitioner reference
stefpiatek Nov 7, 2022
b73b125
Use common global identifier of sample and reason for test
stefpiatek Nov 7, 2022
051d6df
Use panelApp codes for diseases
stefpiatek Nov 9, 2022
d889106
Update variant schema for empty variant
stefpiatek Nov 9, 2022
cf81804
Ensure NHS number validation is carried out
stefpiatek Nov 9, 2022
a16ab19
Catch error in bundle creation
stefpiatek Nov 9, 2022
63cd1eb
Update tests NHS number in correct format
stefpiatek Nov 9, 2022
4b36bde
Check for either NHS number or parent being filled
stefpiatek Nov 9, 2022
499240d
Merge remote-tracking branch 'origin/main' into bundle_update
stefpiatek Nov 9, 2022
d3f4305
Update duplicate practitioner identifier to match new format
stefpiatek Nov 9, 2022
f25d9b8
Simplify NHS or MRN number validation
stefpiatek Nov 9, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,230 changes: 0 additions & 1,230 deletions example_data/sampleFHIR_V2.json

This file was deleted.

701 changes: 701 additions & 0 deletions example_data/sample_bundle.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/code_systems/loinc.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ describe("LOINC", () => {
classification: getSelectOptions(valueSet.classification),
inheritance: getSelectOptions(valueSet.inheritance),
zygosity: getSelectOptions(valueSet.zygosity),
reportFinding: getSelectOptions(valueSet.reportFinding),
followUp: getSelectOptions(valueSet.followUp),
};

Expand Down
1 change: 1 addition & 0 deletions src/code_systems/loinc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const variantCodes = async () => {
classification: await getValueSetData("LL4034-6"),
inheritance: await getValueSetData("LL3731-8"),
zygosity: await getValueSetData("LL381-5"),
reportFinding: await getValueSetData("LL2431-6"),
followUp: await getValueSetData("LL1037-2"),
};
};
Expand Down
56 changes: 56 additions & 0 deletions src/code_systems/loincCodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ type LoincCodes = {
classification: ValueSet;
inheritance: ValueSet;
zygosity: ValueSet;
reportFinding: ValueSet;
followUp: ValueSet;
};

Expand Down Expand Up @@ -216,6 +217,60 @@ export const loincCodes: LoincCodes = {
],
},
},
reportFinding: {
resourceType: "ValueSet",
id: "LL2431-6-2.73",
meta: {
versionId: "1",
lastUpdated: "2022-08-08T12:57:53.978+00:00",
},
url: "http://loinc.org/vs/LL2431-6",
identifier: [
{
system: "urn:ietf:rfc:3986",
value: "urn:oid:1.3.6.1.4.1.12009.10.1.1595",
},
],
version: "Loinc_2.73-2.73",
name: "Pos|Neg|Inconcl",
status: "active",
publisher: "Regenstrief Institute, Inc.",
contact: [
{
name: "Regenstrief Institute, Inc.",
telecom: [
{
system: "url",
value: "https://loinc.org",
},
],
},
],
copyright:
"This material contains content from LOINC (http://loinc.org). LOINC is copyright ©1995-2022, Regenstrief Institute, Inc. and the Logical Observation Identifiers Names and Codes (LOINC) Committee and is available at no cost under the license at http://loinc.org/license. LOINC® is a registered United States trademark of Regenstrief Institute, Inc.",
compose: {
include: [
{
system: "http://loinc.org",
version: "2.73",
concept: [
{
code: "LA6576-8",
display: "Positive",
},
{
code: "LA6577-6",
display: "Negative",
},
{
code: "LA9663-1",
display: "Inconclusive",
},
],
},
],
},
},
followUp: {
resourceType: "ValueSet",
id: "LL1037-2",
Expand Down Expand Up @@ -285,6 +340,7 @@ export const loincSelect = {
classification: getSelectOptions(loincCodes.classification),
inheritance: getSelectOptions(loincCodes.inheritance),
zygosity: getSelectOptions(loincCodes.zygosity),
reportFinding: getSelectOptions(loincCodes.reportFinding),
followUp: getSelectOptions(loincCodes.followUp),
};

Expand Down
114 changes: 114 additions & 0 deletions src/code_systems/panelappCodes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
import { RequiredCoding } from "./types";

export const diseases: RequiredCoding[] = [
{
system: "http://panelapp.genomicsengland.co.uk/api/v1/entities",
code: "R14",
display: "Acutely unwell children with a likely monogenic disorder",
},
{
system: "http://panelapp.genomicsengland.co.uk/api/v1/entities",
code: "R127",
display: "Long QT syndrome",
},
{
system: "http://panelapp.genomicsengland.co.uk/api/v1/entities",
code: "R128",
display: "Brugada syndrome and cardiac sodium channel disease",
},
{
system: "http://panelapp.genomicsengland.co.uk/api/v1/entities",
code: "R129",
display: "Catecholaminergic polymorphic VT",
},
{
system: "http://panelapp.genomicsengland.co.uk/api/v1/entities",
code: "R130",
display: "Short QT syndrome",
},
{
system: "http://panelapp.genomicsengland.co.uk/api/v1/entities",
code: "R131",
display: "Hypertrophic cardiomyopathy",
},
{
system: "http://panelapp.genomicsengland.co.uk/api/v1/entities",
code: "R134",
display: "Familial hypercholesterolaemia",
},
{
system: "http://panelapp.genomicsengland.co.uk/api/v1/entities",
code: "R184",
display: "Cystic fibrosis diagnostic test",
},
{
system: "http://panelapp.genomicsengland.co.uk/api/v1/entities",
code: "R59",
display: "Early onset or syndromic epilepsy",
},
{
system: "http://panelapp.genomicsengland.co.uk/api/v1/entities",
code: "R226",
display: "Inherited parathyroid cancer",
},
{
system: "http://panelapp.genomicsengland.co.uk/api/v1/entities",
code: "R207",
display: "Inherited ovarian cancer (without breast cancer)",
},
{
system: "http://panelapp.genomicsengland.co.uk/api/v1/entities",
code: "R211",
display: "Inherited polyposis and early onset colorectal cancer - germline testing",
},
{
system: "http://panelapp.genomicsengland.co.uk/api/v1/entities",
code: "R215",
display: "CDH1-related cancer syndrome",
},
{
system: "http://panelapp.genomicsengland.co.uk/api/v1/entities",
code: "R404",
display: "Testing of unaffected individuals for inherited cancer predisposition syndromes",
},
{
system: "http://panelapp.genomicsengland.co.uk/api/v1/entities",
code: "R224",
display: "Inherited renal cancer",
},
{
system: "http://panelapp.genomicsengland.co.uk/api/v1/entities",
code: "R364",
display: "DICER1-related cancer predisposition",
},
{
system: "http://panelapp.genomicsengland.co.uk/api/v1/entities",
code: "R367",
display: "Inherited pancreatic cancer",
},
{
system: "http://panelapp.genomicsengland.co.uk/api/v1/entities",
code: "R193",
display: "Cystic renal disease",
},
{
system: "http://panelapp.genomicsengland.co.uk/api/v1/entities",
code: "R173",
display: "Polycystic liver disease",
},
{
system: "http://panelapp.genomicsengland.co.uk/api/v1/entities",
code: "R65",
display: "Aminoglycoside exposure posing risk to hearing",
},
{
system: "http://panelapp.genomicsengland.co.uk/api/v1/entities",
code: "R27",
display: "Congenital malformation and dysmorphism syndromes - microarray and sequencing",
},
{
system: "http://panelapp.genomicsengland.co.uk/api/v1/entities",
code: "R29",
display: "Intellectual disability - microarray and sequencing",
},
];
59 changes: 0 additions & 59 deletions src/code_systems/snomedCodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,62 +27,3 @@ export const sampleTypes: RequiredCoding[] = [
display: "Venous blood specimen",
},
];

export const diseases: RequiredCoding[] = [
{
system: "http://snomed.info/sct",
code: "230387008",
display: "Benign occipital epilepsy of childhood - early onset variant",
},
{
system: "http://snomed.info/sct",
code: "5262007",
display: "Spinal muscular atrophy",
},
{
system: "http://snomed.info/sct",
code: "73297009",
display: "Muscular dystrophy",
},
{
system: "http://snomed.info/sct",
code: "190905008",
display: "Cystic fibrosis",
},
{
system: "http://snomed.info/sct",
code: "398036000",
display: "Familial hypercholesterolemia",
},
// top level SNOMED CT term for cancer
{
system: "http://snomed.info/sct",
code: "363346000",
display: "Malignant neoplastic disease",
},
{
system: "http://snomed.info/sct",
code: "432328008",
display: "Neuroblastoma",
},
{
system: "http://snomed.info/sct",
code: "771233008",
display: "Inflammatory myofibroblastic tumor",
},
{
system: "http://snomed.info/sct",
code: "253062001",
display: "Central nervous system tumor morphology",
},
{
system: "http://snomed.info/sct",
code: "255032005",
display: "Medullary thyroid carcinoma",
},
{
system: "http://snomed.info/sct",
code: "702785000",
display: "Large cell anaplastic lymphoma T cell and Null cell type",
},
];
18 changes: 13 additions & 5 deletions src/components/reports/FormDefaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,21 @@ export const initialValues: FormValues = {
postCode: "WC1N 3BH",
},
patient: {
mrn: "969977",
mrn: "40388914",
nhsNumber: "8105688202",
familyNumber: "Z968769",
firstName: "Donald",
lastName: "Duck",
dateOfBirth: "2012-03-04",
gender: Patient.GenderEnum.Male,
familyNumber: "Z409929",
},
sample: {
specimenCode: "19RG-183G0127",
specimenType: "122555007",
collectionDateTime: "04/06/2019 12:00",
receivedDateTime: "04/06/2019 15:00",
reasonForTest: "230387008",
authorisedDateTime: "04/06/2019 15:30",
reasonForTest: "R59", // epilepsy
reasonForTestText:
"Sequence variant screening in Donald Duck because of epilepsy and atypical absences. " +
"An SLC2A1 variant is suspected.",
Expand All @@ -37,7 +39,7 @@ export const initialValues: FormValues = {
"Clinical features range from severe motor and cognitive impairment with marked choreoathetosis, " +
"self-injurious behaviour and epileptic encephalopathy, to a milder course with moderate developmental delay, " +
"complex stereotypies (facial dyskinesia) and mild epilepsy.",
genomicHGVS: "c.119G>T",
cDnaHgvs: "c.119G>T",
inheritanceMethod: "LA24640-7", // Autosomal dominant
classification: "LA26332-9", // Likely Pathogenic
proteinHGVS: "p.(Gly40Val)",
Expand Down Expand Up @@ -71,6 +73,8 @@ export const initialValues: FormValues = {
"Screening of 82 genes associated with severe delay and seizures " +
"... Variants are classified using the ACMG/AMP guidelines (Richards et al 2015 Genet Med) " +
"/ACGS Best Practice guidelines (2019).",
genesTested: "ADSL, ALG13, ARHGEF9, ARX, ATP1A3, ATRX, BRAT1",
reportFinding: "LA6576-8", // Positive
clinicalConclusion: "Confirms the diagnosis of Childhood-nset epileptic encephalopathy (EEOC).",
},
};
Expand All @@ -90,17 +94,19 @@ export const noValues: FormValues = {
},
patient: {
mrn: "",
nhsNumber: "",
familyNumber: "",
firstName: "",
lastName: "",
dateOfBirth: "",
gender: undefined,
familyNumber: "",
},
sample: {
specimenCode: "",
specimenType: "",
collectionDateTime: "",
receivedDateTime: "",
authorisedDateTime: "",
reasonForTest: "",
reasonForTestText: "",
},
Expand All @@ -112,11 +118,13 @@ export const noValues: FormValues = {
followUp: "",
furtherTesting: "",
testMethodology: "",
genesTested: "",
authorisingDate: "",
authorisingScientist: "",
authorisingScientistTitle: "",
reportingDate: "",
reportingScientist: "",
reportingScientistTitle: "",
reportFinding: "",
},
};
Loading