From 4371c47a657e2a517f89f38637388ecb4ee72874 Mon Sep 17 00:00:00 2001 From: Omar Khan Date: Fri, 30 May 2025 17:18:19 +0100 Subject: [PATCH] First draft of Graph definition for child requests Needs criteria to differentiate requests that are for Duo/Trio vs. other child test scenarios --- ...ion-Genomics-Test-Order-With-Children.json | 755 ++++++++++++++++++ 1 file changed, 755 insertions(+) create mode 100644 GraphDefinition/GraphDefinition-Genomics-Test-Order-With-Children.json diff --git a/GraphDefinition/GraphDefinition-Genomics-Test-Order-With-Children.json b/GraphDefinition/GraphDefinition-Genomics-Test-Order-With-Children.json new file mode 100644 index 00000000..e6c44db8 --- /dev/null +++ b/GraphDefinition/GraphDefinition-Genomics-Test-Order-With-Children.json @@ -0,0 +1,755 @@ +{ + "resourceType": "GraphDefinition", + "id": "GraphDefinition-Genomics-test-order-with-children", + "url": "https://fhir.nhs.uk/GraphDefinition/genomics-test-order-with-children", + "name": "GenomicsTestOrder", + "version": "0.1.0", + "status": "draft", + "date": "2025-05-29", + "publisher" : "NHS England", + "description": "GraphDefinition for defining and retrieving the full set of resources relevant to a Genomic Test Order including children (for split Duo/Trio scenario)", + "start": "ServiceRequest", + "link": [ + { + "path": "ServiceRequest.extension.valueReference", + "sliceName": "additionalContact", + "description": "Link to additional contacts for request", + "min": 0, + "max": "*", + "target": [ + { + "type": "PractitionerRole" + } + ] + }, + { + "path": "ServiceRequest.basedOn", + "description": "Link to parent request (it is expected that a separate call to the $graph=genomics-test-order would be required to retrieve resources referenced from the ServiceRequest", + "min": 0, + "max": "1", + "target": [ + { + "type": "ServiceRequest" + } + ] + }, + { + "path": "ServiceRequest.subject", + "description": "Link to patient the request is for", + "min": 1, + "max": "1", + "target": [ + { + "type": "Patient" + } + ] + }, + { + "path": "ServiceRequest.requester", + "description": "Link to the requester of the genomic test order", + "min": 1, + "max": "1", + "target": [ + { + "type": "PractitionerRole" + } + ] + }, + { + "path": "ServiceRequest.reasonReference", + "description": "Optional link to the primary condition constituting the reason for testing", + "min": 0, + "max": "1", + "target": [ + { + "type": "Condition" + } + ] + }, + { + "path": "ServiceRequest.supportingInfo", + "description": "Link to additional clinical information to support processing/interpretation of the request", + "min": 0, + "max": "*", + "target": [ + { + "type": "RelatedPerson", + "link": [ + { + "description": "Patient linked to this RelatedPerson", + "min": 1, + "max": "1", + "target": [ + { + "type": "Patient", + "params": "link={ref}" + } + ] + } + ] + }, + { + "type": "Observation", + "link": [ + { + "path": "Observation.extension.valueReference", + "description": "Optional link to body structure related to the observation", + "min": 0, + "max": "1", + "target": [ + { + "type": "BodyStructure" + } + ] + }, + { + "path": "Observation.focus", + "description": "Optional link to specimen the observation is about, if relevant", + "min": 0, + "max": "1", + "target": [ + { + "type": "Specimen" + } + ] + }, + { + "path": "Observation.performer", + "description": "Optional link to actor who performed the observation (could be Patient, PractitionerRole or RelatedPerson)", + "min": 0, + "max": "1", + "target": [ + { + "type": "Resource" + } + ] + }, + { + "path": "Observation.hasMember", + "description": "Optional link to observation if parent observation is a panel", + "min": 0, + "max": "*", + "target": [ + { + "type": "Observation" + } + ] + } + ] + }, + { + "type": "Condition", + "link": [ + { + "path": "Condition.recorder", + "description": "Optional link to actor which recorded condition (could be Patient, PreactitionerRole or RelatedPerson)", + "min": 0, + "max": "1", + "target": [ + { + "type": "Resource" + } + ] + }, + { + "path": "Condition.asserter", + "description": "Optional link to actor which asserted condition (could be Patient, PreactitionerRole or RelatedPerson)", + "min": 0, + "max": "1", + "target": [ + { + "type": "Resource" + } + ] + } + ] + }, + { + "type": "Procedure" + }, + { + "type": "FamilyMemberHistory", + "link": [ + { + "path": "FamilyMemberHistory.extension.valueReference", + "sliceName": "family-member-history-genetics-observation", + "description": "Optional link to observations related to a FamilyMemberHistory", + "min": 0, + "max": "*", + "target": [ + { + "type": "Observation" + } + ] + }, + { + "path": "FamilyMemberHistory.extension.valueReference", + "sliceName": "familymemberhistory-patient-record", + "description": "Optional link to Patient resources for related family members", + "min": 0, + "max": "*", + "target": [ + { + "type": "Patient" + } + ] + } + ] + }, + { + "type": "DocumentReference" + }, + { + "type": "DiagnosticReport" + }, + { + "type": "Consent", + "link": [ + { + "path": "Consent.sourceReference", + "description": "Optional link to structured QuestionnaireResponse or DocumentReference for RoD/consent forms", + "min": 0, + "max": "1", + "target": [ + { + "type": "QuestionnaireResponse", + "link": [ + { + "path": "QuestionnaireResponse.author", + "description": "Author of the RoD, most likely a PractitionerRole resource (if a reference)", + "min": 1, + "max": "1", + "target": [ + { + "type": "PractitionerRole" + } + ] + }, + { + "path": "QuestionnaireResponse.source", + "description": "Source of the RoD (could be Patient, PractitionerRole or RelatedPerson)", + "min": 1, + "max": "1", + "target": [ + { + "type": "Resource" + } + ] + } + ] + }, + { + "type": "DocumentReference" + } + ] + }, + { + "path": "Consent.patient", + "description": "Link to Patient resource (relevant for instances where the consent does not apply to the proband)", + "min": 1, + "max": "1", + "target": [ + { + "type": "Patient" + } + ] + } + ] + } + ] + }, + { + "path": "ServiceRequest.specimen", + "description": "Optional link to specimen where this has already been collected/ordered prior to request submission", + "min": 0, + "max": "*", + "target": [ + { + "type": "Specimen", + "link": [ + { + "path": "Specimen.subject", + "description": "Link to the patient the specimen is from", + "min": 1, + "max": "1", + "target": [ + { + "type": "Patient" + } + ] + }, + { + "path": "Specimen.parent", + "description": "Link to parent specimen resource", + "min": 0, + "max": "1", + "target": [ + { + "type": "Specimen" + } + ] + }, + { + "path": "Specimen.collection.collector", + "description": "Link to collector of the specimen", + "min": 0, + "max": "1", + "target": [ + { + "type": "PractitionerRole" + } + ] + }, + { + "path": "Specimen.collection.bodySite.extension.valueReference", + "sliceName": "bodySiteReference", + "description": "Link to the body structure detailing the morphology and topography of the specimen", + "min": 0, + "max": "1", + "target": [ + { + "type": "BodyStructure" + } + ] + } + ] + } + ] + }, + { + "description": "Specimen resources referencing this ServiceRequest", + "min": 0, + "max": "*", + "target": [ + { + "type": "Specimen", + "params": "request={ref}", + "link": [ + { + "path": "Specimen.subject", + "description": "Link to the patient the specimen is from", + "min": 1, + "max": "1", + "target": [ + { + "type": "Patient" + } + ] + }, + { + "path": "Specimen.parent", + "description": "Link to parent specimen resource", + "min": 0, + "max": "1", + "target": [ + { + "type": "Specimen" + } + ] + }, + { + "path": "Specimen.collection.collector", + "description": "Link to collector of the specimen", + "min": 0, + "max": "1", + "target": [ + { + "type": "PractitionerRole" + } + ] + }, + { + "path": "Specimen.collection.bodySite.extension.valueReference", + "sliceName": "bodySiteReference", + "description": "Link to the body structure detailing the morphology and topography of the specimen", + "min": 0, + "max": "1", + "target": [ + { + "type": "BodyStructure" + } + ] + } + ] + } + ] + }, + { + "description": "Requests referencing this ServiceRequest", + "min": 0, + "max": "*", + "target": [ + { + "type": "ServiceRequest", + "params": "based-on={ref}", + "link": [ + { + "path": "ServiceRequest.extension.valueReference", + "sliceName": "additionalContact", + "description": "Link to additional contacts for request", + "min": 0, + "max": "*", + "target": [ + { + "type": "PractitionerRole" + } + ] + }, + { + "path": "ServiceRequest.basedOn", + "description": "Link to parent request (it is expected that a separate call to the $graph=genomics-test-order would be required to retrieve resources referenced from the ServiceRequest", + "min": 0, + "max": "1", + "target": [ + { + "type": "ServiceRequest" + } + ] + }, + { + "path": "ServiceRequest.subject", + "description": "Link to patient the request is for", + "min": 1, + "max": "1", + "target": [ + { + "type": "Patient" + } + ] + }, + { + "path": "ServiceRequest.requester", + "description": "Link to the requester of the genomic test order", + "min": 1, + "max": "1", + "target": [ + { + "type": "PractitionerRole" + } + ] + }, + { + "path": "ServiceRequest.reasonReference", + "description": "Optional link to the primary condition constituting the reason for testing", + "min": 0, + "max": "1", + "target": [ + { + "type": "Condition" + } + ] + }, + { + "path": "ServiceRequest.supportingInfo", + "description": "Link to additional clinical information to support processing/interpretation of the request", + "min": 0, + "max": "*", + "target": [ + { + "type": "RelatedPerson", + "link": [ + { + "description": "Patient linked to this RelatedPerson", + "min": 1, + "max": "1", + "target": [ + { + "type": "Patient", + "params": "link={ref}" + } + ] + } + ] + }, + { + "type": "Observation", + "link": [ + { + "path": "Observation.extension.valueReference", + "description": "Optional link to body structure related to the observation", + "min": 0, + "max": "1", + "target": [ + { + "type": "BodyStructure" + } + ] + }, + { + "path": "Observation.focus", + "description": "Optional link to specimen the observation is about, if relevant", + "min": 0, + "max": "1", + "target": [ + { + "type": "Specimen" + } + ] + }, + { + "path": "Observation.performer", + "description": "Optional link to actor who performed the observation (could be Patient, PractitionerRole or RelatedPerson)", + "min": 0, + "max": "1", + "target": [ + { + "type": "Resource" + } + ] + }, + { + "path": "Observation.hasMember", + "description": "Optional link to observation if parent observation is a panel", + "min": 0, + "max": "*", + "target": [ + { + "type": "Observation" + } + ] + } + ] + }, + { + "type": "Condition", + "link": [ + { + "path": "Condition.recorder", + "description": "Optional link to actor which recorded condition (could be Patient, PreactitionerRole or RelatedPerson)", + "min": 0, + "max": "1", + "target": [ + { + "type": "Resource" + } + ] + }, + { + "path": "Condition.asserter", + "description": "Optional link to actor which asserted condition (could be Patient, PreactitionerRole or RelatedPerson)", + "min": 0, + "max": "1", + "target": [ + { + "type": "Resource" + } + ] + } + ] + }, + { + "type": "Procedure" + }, + { + "type": "FamilyMemberHistory", + "link": [ + { + "path": "FamilyMemberHistory.extension.valueReference", + "sliceName": "family-member-history-genetics-observation", + "description": "Optional link to observations related to a FamilyMemberHistory", + "min": 0, + "max": "*", + "target": [ + { + "type": "Observation" + } + ] + }, + { + "path": "FamilyMemberHistory.extension.valueReference", + "sliceName": "familymemberhistory-patient-record", + "description": "Optional link to Patient resources for related family members", + "min": 0, + "max": "*", + "target": [ + { + "type": "Patient" + } + ] + } + ] + }, + { + "type": "DocumentReference" + }, + { + "type": "DiagnosticReport" + }, + { + "type": "Consent", + "link": [ + { + "path": "Consent.sourceReference", + "description": "Optional link to structured QuestionnaireResponse or DocumentReference for RoD/consent forms", + "min": 0, + "max": "1", + "target": [ + { + "type": "QuestionnaireResponse", + "link": [ + { + "path": "QuestionnaireResponse.author", + "description": "Author of the RoD, most likely a PractitionerRole resource (if a reference)", + "min": 1, + "max": "1", + "target": [ + { + "type": "PractitionerRole" + } + ] + }, + { + "path": "QuestionnaireResponse.source", + "description": "Source of the RoD (could be Patient, PractitionerRole or RelatedPerson)", + "min": 1, + "max": "1", + "target": [ + { + "type": "Resource" + } + ] + } + ] + }, + { + "type": "DocumentReference" + } + ] + }, + { + "path": "Consent.patient", + "description": "Link to Patient resource (relevant for instances where the consent does not apply to the proband)", + "min": 1, + "max": "1", + "target": [ + { + "type": "Patient" + } + ] + } + ] + } + ] + }, + { + "path": "ServiceRequest.specimen", + "description": "Optional link to specimen where this has already been collected/ordered prior to request submission", + "min": 0, + "max": "*", + "target": [ + { + "type": "Specimen", + "link": [ + { + "path": "Specimen.subject", + "description": "Link to the patient the specimen is from", + "min": 1, + "max": "1", + "target": [ + { + "type": "Patient" + } + ] + }, + { + "path": "Specimen.parent", + "description": "Link to parent specimen resource", + "min": 0, + "max": "1", + "target": [ + { + "type": "Specimen" + } + ] + }, + { + "path": "Specimen.collection.collector", + "description": "Link to collector of the specimen", + "min": 0, + "max": "1", + "target": [ + { + "type": "PractitionerRole" + } + ] + }, + { + "path": "Specimen.collection.bodySite.extension.valueReference", + "sliceName": "bodySiteReference", + "description": "Link to the body structure detailing the morphology and topography of the specimen", + "min": 0, + "max": "1", + "target": [ + { + "type": "BodyStructure" + } + ] + } + ] + } + ] + }, + { + "description": "Specimen resources referencing this ServiceRequest", + "min": 0, + "max": "*", + "target": [ + { + "type": "Specimen", + "params": "request={ref}", + "link": [ + { + "path": "Specimen.subject", + "description": "Link to the patient the specimen is from", + "min": 1, + "max": "1", + "target": [ + { + "type": "Patient" + } + ] + }, + { + "path": "Specimen.parent", + "description": "Link to parent specimen resource", + "min": 0, + "max": "1", + "target": [ + { + "type": "Specimen" + } + ] + }, + { + "path": "Specimen.collection.collector", + "description": "Link to collector of the specimen", + "min": 0, + "max": "1", + "target": [ + { + "type": "PractitionerRole" + } + ] + }, + { + "path": "Specimen.collection.bodySite.extension.valueReference", + "sliceName": "bodySiteReference", + "description": "Link to the body structure detailing the morphology and topography of the specimen", + "min": 0, + "max": "1", + "target": [ + { + "type": "BodyStructure" + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] +} \ No newline at end of file