extract information from retained fields in CarePlan component of FHIR Bundle, produce simple data.frame

process_CarePlan(CarePlan)

Arguments

CarePlan

component of FHIR.bundle instance

Value

data.frame

Note

Nov 13 2022, added code to refine the 'category' data processing.

Examples

testf <- system.file("json/Vince741_Rogahn59_6fa3d4ab-c0b6-424a-89d8-7d9105129296.json",
   package="BiocFHIR")
tbun <- process_fhir_bundle(testf)
process_CarePlan(tbun$CarePlan)
#>                                     id                 system      code
#> 1 210fbe32-e22e-4a50-9fd1-a1563553a2dc http://snomed.info/sct    409002
#> 2 210fbe32-e22e-4a50-9fd1-a1563553a2dc http://snomed.info/sct  58332002
#> 3 210fbe32-e22e-4a50-9fd1-a1563553a2dc http://snomed.info/sct  58332002
#> 4 8d5c9c4e-fcad-4c8e-8128-d3b34ea51e8b http://snomed.info/sct 229586001
#> 5 8d5c9c4e-fcad-4c8e-8128-d3b34ea51e8b http://snomed.info/sct 229070002
#> 6 c803a7dd-d2b1-4eae-b956-fd1ebc0412ae http://snomed.info/sct 229586001
#> 7 c803a7dd-d2b1-4eae-b956-fd1ebc0412ae http://snomed.info/sct 229070002
#>                                                    display      status
#> 1                                        Food allergy diet in-progress
#> 2                                        Allergy education in-progress
#> 3                                        Allergy education in-progress
#> 4 Rest, ice, compression and elevation treatment programme   completed
#> 5                                     Stretching exercises   completed
#> 6 Rest, ice, compression and elevation treatment programme   completed
#> 7                                     Stretching exercises   completed
#>                 location        category.system   category.code
#> 1 HALLMARK HEALTH SYSTEM http://snomed.info/sct 326051000000105
#> 2 HALLMARK HEALTH SYSTEM http://snomed.info/sct 326051000000105
#> 3 HALLMARK HEALTH SYSTEM http://snomed.info/sct 326051000000105
#> 4 HALLMARK HEALTH SYSTEM http://snomed.info/sct        91251008
#> 5 HALLMARK HEALTH SYSTEM http://snomed.info/sct        91251008
#> 6 HALLMARK HEALTH SYSTEM http://snomed.info/sct        91251008
#> 7 HALLMARK HEALTH SYSTEM http://snomed.info/sct        91251008
#>             category.display                             subject.reference
#> 1                  Self care urn:uuid:eedf9986-9cf8-4e90-bf68-12a6dd9a31c2
#> 2                  Self care urn:uuid:eedf9986-9cf8-4e90-bf68-12a6dd9a31c2
#> 3                  Self care urn:uuid:eedf9986-9cf8-4e90-bf68-12a6dd9a31c2
#> 4 Physical therapy procedure urn:uuid:eedf9986-9cf8-4e90-bf68-12a6dd9a31c2
#> 5 Physical therapy procedure urn:uuid:eedf9986-9cf8-4e90-bf68-12a6dd9a31c2
#> 6 Physical therapy procedure urn:uuid:eedf9986-9cf8-4e90-bf68-12a6dd9a31c2
#> 7 Physical therapy procedure urn:uuid:eedf9986-9cf8-4e90-bf68-12a6dd9a31c2