synthetichealth / synthea

Synthetic Patient Population Simulator
https://synthetichealth.github.io/synthea
Apache License 2.0
2.13k stars 640 forks source link

Missing required field in CarePlan #242

Closed Ethan826 closed 6 years ago

Ethan826 commented 6 years ago

Hi,

Unless I'm mistaken, under FHIR v3.0.1, CarePlan requires an intent field, which is to be a code from the valueset care-plan-intent. In the Structure tab on the FHIR website, the intent field is listed as 1..1, ditto the UML version, and in the JSON version the red R! for required appears.

But in the sample patients, at least fhir/00/002/002fbbcb-3bcb-4b61-bf78-867620988911.json appears to be missing the intent field. In relevant part, that patient contains the following data:

{
  "status": "completed",
  "category": [{
    "coding": [{
      "system": "http://snomed.info/sct",
      "code": "53950000",
      "display": "Respiratory therapy"
    }]
  }],
  "subject": {
    "reference": "urn:uuid:9a8d83f0-1ea6-421f-91aa-3a8a0b793e11"
  },
  "context": {
    "reference": "urn:uuid:d65fb8da-7f98-4557-be32-649916a5a52e"
  },
  "period": {
    "start": "2009-01-09",
    "end": "2009-05-14"
  },
  "addresses": [{
    "reference": "urn:uuid:9f64468a-6f63-42b6-b5bf-24ab9da2dd79"
  }],
  "activity": [{
      "detail": {
        "code": {
          "coding": [{
            "system": "http://snomed.info/sct",
            "code": "304510005",
            "display": "Recommendation to avoid exercise"
          }]
        },
        "status": "completed"
      }
    },
    {
      "detail": {
        "code": {
          "coding": [{
            "system": "http://snomed.info/sct",
            "code": "371605008",
            "display": "Deep breathing and coughing exercises"
          }]
        },
        "status": "completed"
      }
    }
  ],
  "resourceType": "CarePlan"
}
jawalonoski commented 6 years ago

This was fixed just yesterday in #240. We have not yet updated the available sample data.

Ethan826 commented 6 years ago

Ahh, great. Sorry for the duplication. I'll generate some new test patients locally. Thanks!

jawalonoski commented 6 years ago

No problem! Let us know if you find any other issues.