yalla-coop / curenetics

A platform enabling medical professionals to more quickly find relevant clinical trials for their patients
2 stars 0 forks source link

Edit Jamie's example JSON to include new criteria #81

Closed thejoefriel closed 4 years ago

thejoefriel commented 4 years ago

It has been agreed with @sesola and @jbrough that we will proceed with the example JSON file we have for clinical trials and they will ensure that once the API is live it will match this data structure.

This means, we need to add the additional fields to the example JSON. It will include the following additional criteria for each clinical trial:

eligibility: { 
   inclusion: {
      ECOG status: STRING ("fit" or "not fit")
      Gleason: STRING ("low risk" or "high risk")
      DiseaseWithinProstate: BOOLEAN 
      DiseaseOutsideProstate: BOOLEAN
    },
    exclusion: {
      ECOG status: STRING ("fit" or "not fit")
      Gleason: STRING ("low risk" or "high risk")
      DiseaseWithinProstate: BOOLEAN 
      DiseaseOutsideProstate: BOOLEAN
    }
}

Here's a breakdown of what this means for ECOG and Gleason:

  1. ECOG status 2 or less--> Fit ECOG status 3 and 4 --> not fit

  2. Gleason 3+3, 3+4 or total Gleason 6 or less--> low risk Gleason 4+3, or Gleason >7 --> high risk

If the criteria hasn't been mentioned in the clinical trial then it wouldn't be included in the object. So what we would need to do for each criteria is:

Since there's only two options for each, if we find a positive match in the inclusion criteria then I think we would only need to check either inclusion or exclusion first.

Can someone please add at least one example of each iteration to the existing JSON data so we can have matches for each type of match.

@sesola @jbrough - please inform us immediately if this data shape changes

susanX commented 4 years ago

Results-10-10-19.json in the dummyData folder Now moved to my branch: trials-api PR #91

susanX commented 4 years ago

https://api.myjson.com/bins/118mwa I have made a small temporary api for testing the json with just 13 records on it. It can be fetched from the url above. also https://github.com/yalla-coop/curenetics/issues/81

MohammedYehia commented 4 years ago

@thejoefriel If the criteria hasn't been mentioned in the clinical trial then it wouldn't be included in the object do you mean that we wouldn't have for example ECOG in the Inclusion/exclusion or the whole inclusion/exclusion object wouldn't exist?

if one criteria for example, ECOG in the inclusion exists but doesn't match with patient info should I check the rest of the criteria in the inclusion or move to check it in the exclusion?

also if ECOG in the inclusion empty string but Gleason matches with the patient what will happen in this case?

thejoefriel commented 4 years ago

If the criteria hasn't been mentioned in the clinical trial then it wouldn't be included in the object Hi @MohammedYehia , I changed this actually so that if it isn't in the criteria then it would show an empty string instead. So the keys are always there in the object.

So for example, if nothing is found about ECOG, gleason or disease you'll see it'll look like this in the JSON data:

"Eligibility": {
    "Inclusion": {
        "ECOG status": "",
    "Gleason": "",
        "DiseaseWithinProstate": null,
    "DiseaseOutsideProstate": null
    },
    "Exclusion": {
        "ECOG status": "",
    "Gleason": "",
    "DiseaseWithinProstate": null,
    "DiseaseOutsideProstate": null
    }
    }
},

If one criteria exists and does match then there's no need to check the rest of the criteria as the patient would not be eligible.

If we have an empty string (or null for the disease criteria), then we would still include it. So for example, with the one above where there is no data for any of the eligibility criteria, this trial would be considered potentially eligible for the patient as there's nothing we've found that would mean excluding the client.

Does that make sense?

MohammedYehia commented 4 years ago

@thejoefriel "If one criteria exist and does match then there's no need to check the rest of the criteria as the patient would not be eligible" you mean does not match? and if not then what if ecog doesn't match in inclusion should I check it in the exclusion or consider this to be not eligible

thejoefriel commented 4 years ago

Yes sorry! Meant to say does not match