Skip to content

Commit

Permalink
fix filters
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewpeterkort committed Jan 9, 2025
1 parent 41bb915 commit c4e5575
Show file tree
Hide file tree
Showing 12 changed files with 78 additions and 30 deletions.
8 changes: 4 additions & 4 deletions gql-gen/graph/collectFields.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,17 @@ func (r *queryResolver) GetSelectedFieldsAst(ctx context.Context, sourceType str
}
}

// apply default filters after main filters so that all data can be considered in filter before apply filter statements
applyDefaultFilters(&q, resctx.Args)

if os.Getenv("AUTH_ENABLED") == "true" {
authList, ok := ctx.Value("auth_list").([]interface{})
if !ok {
return nil, fmt.Errorf("auth_list not found or invalid")
}
applyAuthFilters(q, authList)
applyAuthFilters(&q, authList)
}

// apply default filters after main filters so that all data can be considered in filter before apply filter statements
applyDefaultFilters(&q, resctx.Args)

q = q.Render(render)
fmt.Println("QUERY AFTER RENDER: ", q)

Expand Down
20 changes: 11 additions & 9 deletions gql-gen/graph/filters.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,34 @@ package graph

import (
"fmt"
"strings"

"strconv"

"github.com/bmeg/grip/gripql/inspect"
"strings"

"github.com/bmeg/grip/gripql"
"github.com/bmeg/grip/gripql/inspect"
"google.golang.org/protobuf/types/known/structpb"
)

func applyAuthFilters(q *gripql.Query, authList []any) {
func applyAuthFilters(q **gripql.Query, authList []any) {
Has_Statement := &gripql.GraphStatement{Statement: &gripql.GraphStatement_Has{gripql.Within("auth_resource_path", authList...)}}
steps := inspect.PipelineSteps(q.Statements)
steps := inspect.PipelineSteps((*q).Statements)
//fmt.Println("STEPS: ", steps)
FilteredGS := []*gripql.GraphStatement{}
for i, v := range q.Statements {
step_value := 0
for i, v := range (*q).Statements {
//fmt.Println("statement v: ", v)
steps_index, _ := strconv.Atoi(steps[i])
if i == 0 {
FilteredGS = append(FilteredGS, v)
continue
} else if i == steps_index {
} else if steps_index > step_value {
FilteredGS = append(FilteredGS, v, Has_Statement)
step_value++
} else {
FilteredGS = append(FilteredGS, v)
}
}
q.Statements = FilteredGS
(*q).Statements = FilteredGS
}

func applyDefaultFilters(q **gripql.Query, args map[string]any) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
{"gid":"11e86b6c-4e7d-5b94-a892-216e29baf0cb","label":"subject_Specimen","from":"9ae7e542-767f-4b03-a854-7ceed17152cb","to":"60c67a06-ea2d-4d24-9249-418dc77a16a9"}
{"gid":"11e86b6c-4e7d-5b94-a892-216e29baf0cb","label":"subject_Specimen","from":"9ae7e542-767f-4b03-a854-7ceed17152cb","to":"60c67a06-ea2d-4d24-9249-418dc77a16a9"}
{"gid":"01e86b6c-4e7d-5b94-a892-216e29baf0cb","label":"subject_Specimen","from":"8ae7e542-767f-4b03-a854-7ceed17152cb","to":"50c67a06-ea2d-4d24-9249-418dc77a16a9"}
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
{"gid":"655b13f1-1955-510f-bac8-5934777099e4","label":"document_reference","from":"60c67a06-ea2d-4d24-9249-418dc77a16a9","to":"9ae7e542-767f-4b03-a854-7ceed17152cb"}
{"gid":"655b13f1-1955-510f-bac8-5934777099e4","label":"document_reference","from":"60c67a06-ea2d-4d24-9249-418dc77a16a9","to":"9ae7e542-767f-4b03-a854-7ceed17152cb"}
{"gid":"555b13f1-1955-510f-bac8-5934777099e4","label":"document_reference","from":"50c67a06-ea2d-4d24-9249-418dc77a16a9","to":"8ae7e542-767f-4b03-a854-7ceed17152cb"}
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
{"gid":"9ae7e542-767f-4b03-a854-7ceed17152cb","label":"DocumentReference","data":{"auth_resource_path":"/programs/ohsu/projects/test","content":[{"attachment":{"contentType":"text/fastq","creation":"2024-08-21T10:53:00+00:00","extension":[{"url":"http://aced-idp.org/fhir/StructureDefinition/md5","valueString":"227f0a5379362d42eaa1814cfc0101b8"},{"url":"http://aced-idp.org/fhir/StructureDefinition/source_path","valueUrl":"file:///home/LabA/specimen_1234_labA.fq.gz"}],"size":5595609484,"title":"specimen_1234_labA.fq.gz","url":"file:///home/LabA/specimen_1234_labA.fq.gz"}}],"date":"2024-08-21T10:53:00+00:00","docStatus":"final","id":"9ae7e542-767f-4b03-a854-7ceed17152cb","identifier":[{"system":"https://my_demo.org/labA","use":"official","value":"9ae7e542-767f-4b03-a854-7ceed17152cb"}],"resourceType":"DocumentReference","status":"current","subject":{"reference":"Specimen/60c67a06-ea2d-4d24-9249-418dc77a16a9"}}}
{"gid":"9ae7e542-767f-4b03-a854-7ceed17152cb","label":"DocumentReference","data":{"auth_resource_path":"/programs/ohsu/projects/test","content":[{"attachment":{"contentType":"text/fastq","creation":"2024-08-21T10:53:00+00:00","extension":[{"url":"http://aced-idp.org/fhir/StructureDefinition/md5","valueString":"227f0a5379362d42eaa1814cfc0101b8"},{"url":"http://aced-idp.org/fhir/StructureDefinition/source_path","valueUrl":"file:///home/LabA/specimen_1234_labA.fq.gz"}],"size":5595609484,"title":"specimen_1234_labA.fq.gz","url":"file:///home/LabA/specimen_1234_labA.fq.gz"}}],"date":"2024-08-21T10:53:00+00:00","docStatus":"final","id":"9ae7e542-767f-4b03-a854-7ceed17152cb","identifier":[{"system":"https://my_demo.org/labA","use":"official","value":"9ae7e542-767f-4b03-a854-7ceed17152cb"}],"resourceType":"DocumentReference","status":"current","subject":{"reference":"Specimen/60c67a06-ea2d-4d24-9249-418dc77a16a9"}}}
{"gid":"8ae7e542-767f-4b03-a854-7ceed17152cb","label":"DocumentReference","data":{"auth_resource_path":"/programs/ohsu/projects/test-invalid","content":[{"attachment":{"contentType":"text/fastq","creation":"2024-08-21T10:53:00+00:00","extension":[{"url":"http://aced-idp.org/fhir/StructureDefinition/md5","valueString":"227f0a5379362d42eaa1814cfc0101b8"},{"url":"http://aced-idp.org/fhir/StructureDefinition/source_path","valueUrl":"file:///home/LabA/specimen_1234_labA.fq.gz"}],"size":5595609484,"title":"specimen_1234_labA.fq.gz","url":"file:///home/LabA/specimen_1234_labA.fq.gz"}}],"date":"2024-08-21T10:53:00+00:00","docStatus":"final","id":"8ae7e542-767f-4b03-a854-7ceed17152cb","identifier":[{"system":"https://my_demo.org/labA","use":"official","value":"8ae7e542-767f-4b03-a854-7ceed17152cb"}],"resourceType":"DocumentReference","status":"current","subject":{"reference":"Specimen/50c67a06-ea2d-4d24-9249-418dc77a16a9"}}}
8 changes: 7 additions & 1 deletion tests/fixtures/combio-examples-grip/Observation.in.edge.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,10 @@
{"gid":"e2867c6d-db7e-5d6e-87d8-b1c293f5b47e","label":"subject_Patient","from":"4e3c6b59-b1fd-5c26-a611-da4cde9fd061","to":"bc4e1aa6-cb52-40e9-8f20-594d9c84f920"}
{"gid":"2bc87039-7ec6-539a-b73b-158fbb4ea778","label":"focus_DocumentReference","from":"21f3411d-89a4-4bcc-9ce7-b76edb1c745f","to":"9ae7e542-767f-4b03-a854-7ceed17152cb"}
{"gid":"72ec2c73-7dd7-5fc7-97f1-cc4a53707159","label":"specimen_Specimen","from":"21f3411d-89a4-4bcc-9ce7-b76edb1c745f","to":"60c67a06-ea2d-4d24-9249-418dc77a16a9"}
{"gid":"a6268b43-7100-5663-bbbb-60dd736873a0","label":"subject_Patient","from":"21f3411d-89a4-4bcc-9ce7-b76edb1c745f","to":"bc4e1aa6-cb52-40e9-8f20-594d9c84f920"}
{"gid":"a6268b43-7100-5663-bbbb-60dd736873a0","label":"subject_Patient","from":"21f3411d-89a4-4bcc-9ce7-b76edb1c745f","to":"bc4e1aa6-cb52-40e9-8f20-594d9c84f920"}
{"gid":"1bc87039-7ec6-539a-b73b-158fbb4ea778","label":"focus_DocumentReference","from":"01f3411d-89a4-4bcc-9ce7-b76edb1c745f","to":"8ae7e542-767f-4b03-a854-7ceed17152cb"}
{"gid":"62ec2c73-7dd7-5fc7-97f1-cc4a53707159","label":"specimen_Specimen","from":"01f3411d-89a4-4bcc-9ce7-b76edb1c745f","to":"50c67a06-ea2d-4d24-9249-418dc77a16a9"}
{"gid":"z6268b43-7100-5663-bbbb-60dd736873a0","label":"subject_Patient","from":"01f3411d-89a4-4bcc-9ce7-b76edb1c745f","to":"ac4e1aa6-cb52-40e9-8f20-594d9c84f920"}
{"gid":"0bc87039-7ec6-539a-b73b-158fbb4ea778","label":"focus_DocumentReference","from":"11f3411d-89a4-4bcc-9ce7-b76edb1c745f","to":"8ae7e542-767f-4b03-a854-7ceed17152cb"}
{"gid":"52ec2c73-7dd7-5fc7-97f1-cc4a53707159","label":"specimen_Specimen","from":"11f3411d-89a4-4bcc-9ce7-b76edb1c745f","to":"50c67a06-ea2d-4d24-9249-418dc77a16a9"}
{"gid":"y6268b43-7100-5663-bbbb-60dd736873a0","label":"subject_Patient","from":"11f3411d-89a4-4bcc-9ce7-b76edb1c745f","to":"ac4e1aa6-cb52-40e9-8f20-594d9c84f920"}
9 changes: 6 additions & 3 deletions tests/fixtures/combio-examples-grip/Observation.out.edge.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
{"gid":"2201f601-22b6-514f-9059-ffb17ec11961","label":"subject_observation","from":"bc4e1aa6-cb52-40e9-8f20-594d9c84f920","to":"cec32723-9ede-5f24-ba63-63cb8c6a02cf"}
{"gid":"6d4b193a-4a6d-5a0e-904f-933dd6fe1d48","label":"focus_observation","from":"60c67a06-ea2d-4d24-9249-418dc77a16a9","to":"4e3c6b59-b1fd-5c26-a611-da4cde9fd061"}
{"gid":"872b44a7-4bf6-5169-a861-d5b66328a474","label":"subject_observation","from":"bc4e1aa6-cb52-40e9-8f20-594d9c84f920","to":"4e3c6b59-b1fd-5c26-a611-da4cde9fd061"}
{"gid":"4579f383-75d0-5cc5-9c5b-bb4e920225bc","label":"focus_observation","from":"9ae7e542-767f-4b03-a854-7ceed17152cb","to":"21f3411d-89a4-4bcc-9ce7-b76edb1c745f"}
{"gid":"dcdd2268-d0e8-5d20-81cd-dd341e0d23cf","label":"specimen_observation","from":"60c67a06-ea2d-4d24-9249-418dc77a16a9","to":"21f3411d-89a4-4bcc-9ce7-b76edb1c745f"}
{"gid":"7b701827-a13f-5fe9-a700-54ffb651b955","label":"subject_observation","from":"bc4e1aa6-cb52-40e9-8f20-594d9c84f920","to":"21f3411d-89a4-4bcc-9ce7-b76edb1c745f"}
{"gid":"4579f383-75d0-5cc5-9c5b-bb4e920225bc","label":"focus_observation","from":"9ae7e542-767f-4b03-a854-7ceed17152cb","to":"11f3411d-89a4-4bcc-9ce7-b76edb1c745f"}
{"gid":"dcdd2268-d0e8-5d20-81cd-dd341e0d23cf","label":"specimen_observation","from":"60c67a06-ea2d-4d24-9249-418dc77a16a9","to":"11f3411d-89a4-4bcc-9ce7-b76edb1c745f"}
{"gid":"7b701827-a13f-5fe9-a700-54ffb651b955","label":"subject_observation","from":"bc4e1aa6-cb52-40e9-8f20-594d9c84f920","to":"11f3411d-89a4-4bcc-9ce7-b76edb1c745f"}
{"gid":"3579f383-75d0-5cc5-9c5b-bb4e920225bc","label":"focus_observation","from":"8ae7e542-767f-4b03-a854-7ceed17152cb","to":"11f3411d-89a4-4bcc-9ce7-b76edb1c745f"}
{"gid":"ccdd2268-d0e8-5d20-81cd-dd341e0d23cf","label":"specimen_observation","from":"50c67a06-ea2d-4d24-9249-418dc77a16a9","to":"11f3411d-89a4-4bcc-9ce7-b76edb1c745f"}
{"gid":"6b701827-a13f-5fe9-a700-54ffb651b955","label":"subject_observation","from":"ac4e1aa6-cb52-40e9-8f20-594d9c84f920","to":"11f3411d-89a4-4bcc-9ce7-b76edb1c745f"}
4 changes: 3 additions & 1 deletion tests/fixtures/combio-examples-grip/Observation.vertex.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{"gid":"cec32723-9ede-5f24-ba63-63cb8c6a02cf","label":"Observation","data":{"auth_resource_path":"/programs/ohsu/projects/test","category":[{"coding":[{"code":"laboratory","display":"Laboratory","system":"http://terminology.hl7.org/CodeSystem/observation-category"}]}],"code":{"coding":[{"code":"Gen3 Sequencing Metadata","display":"Gen3 Sequencing Metadata","system":"https://my_demo.org/labA"}]},"component":[{"code":{"coding":[{"code":"sequencer","display":"sequencer","system":"https://my_demo.org/labA"}],"text":"sequencer"},"valueString":"Illumina Seq 1000"},{"code":{"coding":[{"code":"index","display":"index","system":"https://my_demo.org/labA"}],"text":"index"},"valueString":"100bp Single index"},{"code":{"coding":[{"code":"type","display":"type","system":"https://my_demo.org/labA"}],"text":"type"},"valueString":"Exome"},{"code":{"coding":[{"code":"project_id","display":"project_id","system":"https://my_demo.org/labA"}],"text":"project_id"},"valueString":"labA_projectXYZ"},{"code":{"coding":[{"code":"read_length","display":"read_length","system":"https://my_demo.org/labA"}],"text":"read_length"},"valueString":"100"},{"code":{"coding":[{"code":"instrument_run_id","display":"instrument_run_id","system":"https://my_demo.org/labA"}],"text":"instrument_run_id"},"valueString":"234_ABC_1_8899"},{"code":{"coding":[{"code":"capture_bait_set","display":"capture_bait_set","system":"https://my_demo.org/labA"}],"text":"capture_bait_set"},"valueString":"Human Exom 2X"},{"code":{"coding":[{"code":"end_type","display":"end_type","system":"https://my_demo.org/labA"}],"text":"end_type"},"valueString":"Paired-End"},{"code":{"coding":[{"code":"capture","display":"capture","system":"https://my_demo.org/labA"}],"text":"capture"},"valueString":"emitter XT"},{"code":{"coding":[{"code":"sequencing_site","display":"sequencing_site","system":"https://my_demo.org/labA"}],"text":"sequencing_site"},"valueString":"AdvancedGeneExom"},{"code":{"coding":[{"code":"construction","display":"construction","system":"https://my_demo.org/labA"}],"text":"construction"},"valueString":"library_construction"}],"focus":[{"reference":"DocumentReference/9ae7e542-767f-4b03-a854-7ceed17152cb"}],"id":"cec32723-9ede-5f24-ba63-63cb8c6a02cf","identifier":[{"system":"https://my_demo.org/labA","use":"official","value":"patientX_1234-9ae7e542-767f-4b03-a854-7ceed17152cb-sequencer"}],"resourceType":"Observation","specimen":{"reference":"Specimen/60c67a06-ea2d-4d24-9249-418dc77a16a9"},"status":"final","subject":{"reference":"Patient/bc4e1aa6-cb52-40e9-8f20-594d9c84f920"}}}
{"gid":"4e3c6b59-b1fd-5c26-a611-da4cde9fd061","label":"Observation","data":{"auth_resource_path":"/programs/ohsu/projects/test","category":[{"coding":[{"code":"laboratory","display":"Laboratory","system":"http://terminology.hl7.org/CodeSystem/observation-category"}],"text":"Laboratory"}],"code":{"coding":[{"code":"labA specimen metadata","display":"labA specimen metadata","system":"https://my_demo.org/labA"}],"text":"sample type abc"},"component":[{"code":{"coding":[{"code":"sample_type","display":"sample_type","system":"https://my_demo.org/labA"}],"text":"sample_type"},"valueString":"Primary Solid Tumor"},{"code":{"coding":[{"code":"library_id","display":"library_id","system":"https://my_demo.org/labA"}],"text":"library_id"},"valueString":"12345"},{"code":{"coding":[{"code":"tissue_type","display":"tissue_type","system":"https://my_demo.org/labA"}],"text":"tissue_type"},"valueString":"Tumor"},{"code":{"coding":[{"code":"treatments","display":"treatments","system":"https://my_demo.org/labA"}],"text":"treatments"},"valueString":"Trastuzumab"},{"code":{"coding":[{"code":"allocated_for_site","display":"allocated_for_site","system":"https://my_demo.org/labA"}],"text":"allocated_for_site"},"valueString":"TEST Clinical Research"},{"code":{"coding":[{"code":"pathology_data","display":"pathology_data","system":"https://my_demo.org/labA"}],"text":"pathology_data"}},{"code":{"coding":[{"code":"clinical_event","display":"clinical_event","system":"https://my_demo.org/labA"}],"text":"clinical_event"}},{"code":{"coding":[{"code":"indexed_collection_date","display":"indexed_collection_date","system":"https://my_demo.org/labA"}],"text":"indexed_collection_date"},"valueInteger":365},{"code":{"coding":[{"code":"biopsy_specimens_bems_id","display":"biopsy_specimens_bems_id","system":"https://my_demo.org/labA"}],"text":"biopsy_specimens"},"valueString":"specimenA, specimenB, specimenC"},{"code":{"coding":[{"code":"biopsy_procedure_type","display":"biopsy_procedure_type","system":"https://my_demo.org/labA"}],"text":"biopsy_procedure_type"},"valueString":"Biopsy - Core"},{"code":{"coding":[{"code":"biopsy_anatomical_location","display":"biopsy_anatomical_location","system":"https://my_demo.org/labA"}],"text":"biopsy_anatomical_location"},"valueString":"top axillary lymph node"},{"code":{"coding":[{"code":"percent_tumor","display":"percent_tumor","system":"https://my_demo.org/labA"}],"text":"percent_tumor"},"valueString":"30"}],"focus":[{"reference":"Specimen/60c67a06-ea2d-4d24-9249-418dc77a16a9"}],"id":"4e3c6b59-b1fd-5c26-a611-da4cde9fd061","identifier":[{"system":"https://my_demo.org/labA","use":"official","value":"patientX_1234-specimen_1234_labA-sample_type"}],"resourceType":"Observation","status":"final","subject":{"reference":"Patient/bc4e1aa6-cb52-40e9-8f20-594d9c84f920"}}}
{"gid":"21f3411d-89a4-4bcc-9ce7-b76edb1c745f","label":"Observation","data":{"auth_resource_path":"/programs/ohsu/projects/test","category":[{"coding":[{"code":"laboratory","display":"Laboratory","system":"http://terminology.hl7.org/CodeSystem/observation-category"}]}],"code":{"coding":[{"code":"81247-9","display":"Genomic structural variant copy number","system":"https://loinc.org"}]},"component":[{"code":{"coding":[{"code":"Gene","display":"Gene","system":"https://my_demo.org/labA"}],"text":"Gene"},"valueString":"TP53"},{"code":{"coding":[{"code":"Chromosome","display":"Chromosome","system":"https://my_demo.org/labA"}],"text":"Chromosome"},"valueString":"chr17"},{"code":{"coding":[{"code":"result","display":"result","system":"https://my_demo.org/labA"}],"text":"result"},"valueString":"gain of function (GOF)"}],"focus":[{"reference":"DocumentReference/9ae7e542-767f-4b03-a854-7ceed17152cb"}],"id":"21f3411d-89a4-4bcc-9ce7-b76edb1c745f","identifier":[{"system":"https://my_demo.org/labA","use":"official","value":"patientX_1234-9ae7e542-767f-4b03-a854-7ceed17152cb-Gene"}],"resourceType":"Observation","specimen":{"reference":"Specimen/60c67a06-ea2d-4d24-9249-418dc77a16a9"},"status":"final","subject":{"reference":"Patient/bc4e1aa6-cb52-40e9-8f20-594d9c84f920"}}}
{"gid":"21f3411d-89a4-4bcc-9ce7-b76edb1c745f","label":"Observation","data":{"auth_resource_path":"/programs/ohsu/projects/test","category":[{"coding":[{"code":"laboratory","display":"Laboratory","system":"http://terminology.hl7.org/CodeSystem/observation-category"}]}],"code":{"coding":[{"code":"81247-9","display":"Genomic structural variant copy number","system":"https://loinc.org"}]},"component":[{"code":{"coding":[{"code":"Gene","display":"Gene","system":"https://my_demo.org/labA"}],"text":"Gene"},"valueString":"TP53"},{"code":{"coding":[{"code":"Chromosome","display":"Chromosome","system":"https://my_demo.org/labA"}],"text":"Chromosome"},"valueString":"chr17"},{"code":{"coding":[{"code":"result","display":"result","system":"https://my_demo.org/labA"}],"text":"result"},"valueString":"gain of function (GOF)"}],"focus":[{"reference":"DocumentReference/9ae7e542-767f-4b03-a854-7ceed17152cb"}],"id":"21f3411d-89a4-4bcc-9ce7-b76edb1c745f","identifier":[{"system":"https://my_demo.org/labA","use":"official","value":"patientX_1234-9ae7e542-767f-4b03-a854-7ceed17152cb-Gene"}],"resourceType":"Observation","specimen":{"reference":"Specimen/60c67a06-ea2d-4d24-9249-418dc77a16a9"},"status":"final","subject":{"reference":"Patient/bc4e1aa6-cb52-40e9-8f20-594d9c84f920"}}}
{"gid":"11f3411d-89a4-4bcc-9ce7-b76edb1c745f","label":"Observation","data":{"auth_resource_path":"/programs/ohsu/projects/test-invalid","category":[{"coding":[{"code":"laboratory","display":"Laboratory","system":"http://terminology.hl7.org/CodeSystem/observation-category"}]}],"code":{"coding":[{"code":"81247-9","display":"Genomic structural variant copy number","system":"https://loinc.org"}]},"component":[{"code":{"coding":[{"code":"Gene","display":"Gene","system":"https://my_demo.org/labA"}],"text":"Gene"},"valueString":"TP53"},{"code":{"coding":[{"code":"Chromosome","display":"Chromosome","system":"https://my_demo.org/labA"}],"text":"Chromosome"},"valueString":"chr17"},{"code":{"coding":[{"code":"result","display":"result","system":"https://my_demo.org/labA"}],"text":"result"},"valueString":"gain of function (GOF)"}],"focus":[{"reference":"DocumentReference/8ae7e542-767f-4b03-a854-7ceed17152cb"}],"id":"11f3411d-89a4-4bcc-9ce7-b76edb1c745f","identifier":[{"system":"https://my_demo.org/labA","use":"official","value":"patientX_1234-9ae7e542-767f-4b03-a854-7ceed17152cb-Gene"}],"resourceType":"Observation","specimen":{"reference":"Specimen/50c67a06-ea2d-4d24-9249-418dc77a16a9"},"status":"final","subject":{"reference":"Patient/ac4e1aa6-cb52-40e9-8f20-594d9c84f920"}}}
{"gid":"01f3411d-89a4-4bcc-9ce7-b76edb1c745f","label":"Observation","data":{"auth_resource_path":"/programs/ohsu/projects/test","category":[{"coding":[{"code":"laboratory","display":"Laboratory","system":"http://terminology.hl7.org/CodeSystem/observation-category"}]}],"code":{"coding":[{"code":"81247-9","display":"Genomic structural variant copy number","system":"https://loinc.org"}]},"component":[{"code":{"coding":[{"code":"Gene","display":"Gene","system":"https://my_demo.org/labA"}],"text":"Gene"},"valueString":"TP53"},{"code":{"coding":[{"code":"Chromosome","display":"Chromosome","system":"https://my_demo.org/labA"}],"text":"Chromosome"},"valueString":"chr17"},{"code":{"coding":[{"code":"result","display":"result","system":"https://my_demo.org/labA"}],"text":"result"},"valueString":"gain of function (GOF)"}],"focus":[{"reference":"DocumentReference/8ae7e542-767f-4b03-a854-7ceed17152cb"}],"id":"01f3411d-89a4-4bcc-9ce7-b76edb1c745f","identifier":[{"system":"https://my_demo.org/labA","use":"official","value":"patientX_1234-9ae7e542-767f-4b03-a854-7ceed17152cb-Gene"}],"resourceType":"Observation","specimen":{"reference":"Specimen/50c67a06-ea2d-4d24-9249-418dc77a16a9"},"status":"final","subject":{"reference":"Patient/ac4e1aa6-cb52-40e9-8f20-594d9c84f920"}}}
Loading

0 comments on commit c4e5575

Please sign in to comment.