You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
script added to convert tabular data to json. Example input json files added to sandbox. Minor updates for scaffold to work with new json input files. (#493)
Copy file name to clipboardExpand all lines: data ingestion model/README.md
+85-8Lines changed: 85 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,15 +11,15 @@ The data was structured using FHIR resources to the extent possible. Since no su
11
11
## Performance Data Structure
12
12
### Provider information (`PractitionerRole`)
13
13
The [`PractitionerRole`](https://build.fhir.org/practitionerrole.html) resource is used to represent message recipients(individuals or organizations), their relationships and their roles. The input data include a table (PractitionerRole.csv) with the following columns:
14
-
-**[PractitionerRole.identifier](https://build.fhir.org/practitionerrole-definitions.html#PractitionerRole.identifier)**: Unique identifier for each row in the Practitiner table. This identifier links performance data, history and preferences to each recipient. In those datasets, PractitionerRole.identifier is refered to as subject.
14
+
-**[PractitionerRole.identifier](https://build.fhir.org/practitionerrole-definitions.html#PractitionerRole.identifier)**: Unique identifier for each row in the Practitiner table. This identifier links performance data, history and preferences to each recipient. In those datasets, PractitionerRole.identifier is referred to as subject.
15
15
-**[PractitionerRole.practitioner](https://build.fhir.org/practitionerrole-definitions.html#PractitionerRole.practitioner)**: Contains the practitioner identifier. If this column has a value, the row represents an individual practitioner otherwise it is aggregate data for a group for example a hospital.
16
16
-**[PractitionerRole.organization](https://build.fhir.org/practitionerrole-definitions.html#PractitionerRole.organization)**: Contains the identifier of the institution where the recipient serves. This field, together with `PractitionerRole.code` is used to identify the comparator data associated with each recipient.
17
17
18
18
-**[PractitionerRole.code](https://build.fhir.org/practitionerrole-definitions.html#PractitionerRole.code)**: Contains the role of the recipient in the institution. Example values for this field could be `Resident`, `Attending` or `CRNA`.
19
19
-**type**: Indicates whether the performance data belong to an individual provider or to a group of providers. Accordingly, a `PractitionerRole` may represent either a single provider or a group. This field is not part of the FHIR `PractitionerRole` resource; in our model, it is introduced to classify `PractitionerRole` as either individual or group, allowing us to distinguish between the two types of performance data. Example values include `Practitioner` and `Organization`.
20
20
21
21
### Performance data (`MeasureReport`)
22
-
Performance data are modeled using the [`MeasureReport`](https://build.fhir.org/measurereport.html) resource, which represents the results of a measure evaluation. In SCAFFOLD, each row of performance data is modled as a measure report. Accordingly, the input data include a table (PerformanceMeasureReport.csv) with the following columns:
22
+
Performance data are modeled using the [`MeasureReport`](https://build.fhir.org/measurereport.html) resource, which represents the results of a measure evaluation. In SCAFFOLD, each row of performance data is modeled as a measure report. Accordingly, the input data include a table (PerformanceMeasureReport.csv) with the following columns:
23
23
-**[identifier](https://build.fhir.org/measurereport-definitions.html#MeasureReport.identifier)**: Uniquely identifies a specific performance data record.
This will start by creatig the list of hospitals in PractitionerRole.csv file. Then will generate performance data in PerformanceMeasureReports.csv. Next step will create the comparator data in ComparatorMeasureReport.csv. Then the preferences will be added to preferences.csv. Finall step will use SCAFFOLD to generate the history of messages generated by pipeline for the months before the performance month.
122
+
This will start by creating the list of hospitals in PractitionerRole.csv file. Then will generate performance data in PerformanceMeasureReports.csv. Next step will create the comparator data in ComparatorMeasureReport.csv. Then the preferences will be added to preferences.csv. Final step will use SCAFFOLD to generate the history of messages generated by pipeline for the months before the performance month.
121
123
122
124
This process will start by creating a list of hospitals in the `PractitionerRole.csv` file. Next, performance data will be generated in `PerformanceMeasureReports.csv`. The following step will create comparator data in `ComparatorMeasureReport.csv`. Preferences will then be added to `preferences.csv`. Finally, SCAFFOLD will be used to generate the history of messages produced by the pipeline for the months preceding the performance month and store it in `MessageHistory.csv`.
123
125
126
+
### Convert Data To JSON-LD Inputs
127
+
You can use the script in TabularToJson.py to convert data in tabular format to json-ld input files. Use the following to run this script on a path where the tabular data with all the required files that follow the SCAFFOLD data ingestion model exists to generate json-ld inputs files
Sandbox hospital-level example data is generated for 100 hospitals and included in the sandbox examples folder. This folder includes:
134
+
Sandbox hospital-level example data is generated for 100 hospitals and included in the sandbox examples folder. This folder includes both tabular data and json-ld input files for same hospitals.
135
+
136
+
137
+
### Tabular data
138
+
Tabular input data includes:
126
139
127
-
### Performance Data
140
+
####Performance Data
128
141
- PractitionerRole.csv, which contains hospital definitions
129
142
- PerformanceMeaasureReport, which contains performance data for each hospital on 12 defined measures in sandbox knowledge base for 12 month.
130
143
- config.json, which is required to find the right comparator for each recipient
131
144
- ComparatorMeasureReport.csv, which contains the comparator data based on the entire network for each measure, for each month.
132
145
133
-
### Prioritization Data
146
+
####Prioritization Data
134
147
- Preferences.csv, which includes preferences for a small subgroup of recipients.
135
148
- MessageHistory.csv, which includes history of generated messages for 11 month before the performance month.
136
149
150
+
### JSON-LD Input files
151
+
The `JSON Messages` folder contains json-ld input files for the same data. Each file is created using the following template. See examples for more detail.
To run SCAFFOLD on sandbox data you need to prepare the environment and install SCAFFOLD. For more detail, follow the `Quick start` section of the [main SCAFFOLD documentation page](../README.md). Skip `Run SCAFFOLD API`and`Run SCAFFOLD CLI with JSON inputs` sections and continue with `Run SCAFFOLD CLI with CSV inputs`.
215
+
To run SCAFFOLD on sandbox data you need to prepare the environment and install SCAFFOLD. For more detail, follow the `Quick start` section of the [main SCAFFOLD documentation page](../README.md). You can process JSON input files using `Run SCAFFOLD API`or`Run SCAFFOLD CLI with JSON inputs` sections. Use `Run SCAFFOLD CLI with CSV inputs` section to process tabular data.
139
216
140
217
## Expected Output
141
218
Here is an example of the output from SCAFFOLD after processing the sandbox example data:
SCAFFOLD also creates a `messages` folder, which contains a summary of the generated candidates (`candidates.csv`) and a detailed JSON file for each generated message. Each JSON file includes information about the selected message, all created candidates with their scoreing details, and any generated images.
286
+
SCAFFOLD also creates a `messages` folder, which contains a summary of the generated candidates (`candidates.csv`) and a detailed JSON file for each generated message. Each JSON file includes information about the selected message, all created candidates with their scoring details, and any generated images.
0 commit comments