Skip to content

Commit 0d0b5f6

Browse files
authored
479 make the input messages format json ld (#495)
* Sandbox generator and input messages examples are made json-ld. pipeline updated to be able to consime new json-ld formatted inpu files. Minor bug fix related to preferences setup in batch-csv command line interface. Readme updated * context file added * sandbox json input files updated using the context file
1 parent 28a3970 commit 0d0b5f6

File tree

109 files changed

+624745
-628658
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+624745
-628658
lines changed

context/1.0/context.jsonld

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
{
2+
"@id": "https://display-lab.github.io/scaffold/context.jsonld",
3+
"@context": {
4+
"dc": "http://purl.org/dc/elements/1.1/",
5+
"dcterms": "http://purl.org/dc/terms/",
6+
"schema": "http://schema.org/",
7+
"scaffold": "http://displaylab.com/scaffold#",
8+
"psdo": "http://purl.obolibrary.org/obo/",
9+
"fhir": "http://hl7.org/fhir/",
10+
"message_template": {
11+
"@id": "psdo:PSDO_0000002"
12+
},
13+
"measure": {
14+
"@id": "psdo:PSDO_0000102"
15+
},
16+
"performance_summary_document": {
17+
"@id": "psdo:PSDO_0000098"
18+
},
19+
"performance_measure_report": {
20+
"@id": "psdo:PSDO_0000107"
21+
},
22+
"performance_month": {
23+
"@id": "scaffold:performance_month"
24+
},
25+
"History": {
26+
"@id": "scaffold:History"
27+
},
28+
"Preferences": {
29+
"@id": "scaffold:Preferences"
30+
},
31+
"comparator_measure_report": {
32+
"@id": "scaffold:comparator_measure_report"
33+
},
34+
"PractitionerRole": {
35+
"@id": "scaffold:PractitionerRole"
36+
},
37+
"subject": {
38+
"@id": "scaffold:subject"
39+
},
40+
"PractitionerRole.identifier": {
41+
"@id": "scaffold:PractitionerRole.identifier"
42+
},
43+
"PractitionerRole.practitioner": {
44+
"@id": "scaffold:PractitionerRole.practitioner"
45+
},
46+
"PractitionerRole.organization": {
47+
"@id": "scaffold:PractitionerRole.organization"
48+
},
49+
"PractitionerRole.code": {
50+
"@id": "scaffold:PractitionerRole.code"
51+
},
52+
"identifier": {
53+
"@id": "scaffold:identifier"
54+
},
55+
"period.start": {
56+
"@id": "scaffold:period.start"
57+
},
58+
"period.end": {
59+
"@id": "scaffold:period.end"
60+
},
61+
"measureScore.rate": {
62+
"@id": "scaffold:measureScore.rate"
63+
},
64+
"measureScore.denominator": {
65+
"@id": "scaffold:measureScore.denominator"
66+
},
67+
"measureScore.range": {
68+
"@id": "scaffold:measureScore.range"
69+
},
70+
"group.subject": {
71+
"@id": "scaffold:group.subject"
72+
},
73+
"group.code": {
74+
"@id": "scaffold:group.code"
75+
},
76+
"message_template_name": {
77+
"@id": "scaffold:message_template_name"
78+
},
79+
"message_generated_datetime": {
80+
"@id": "scaffold:message_generated_datetime:"
81+
},
82+
"acceptable_by": {
83+
"@id": "scaffold:acceptable_by"
84+
},
85+
"Utilities": {
86+
"@id": "scaffold:Utilities"
87+
},
88+
"Message_Format": {
89+
"@id": "scaffold:Message_Format"
90+
},
91+
"Display_Format": {
92+
"@id": "scaffold:Display_Format"
93+
},
94+
"Social gain": {
95+
"@id": "scaffold:Social_gain"
96+
},
97+
"Worsening": {
98+
"@id": "scaffold:Worsening"
99+
},
100+
"Bar chart": {
101+
"@id": "scaffold:Bar_chart"
102+
},
103+
"Line chart": {
104+
"@id": "scaffold:Line_chart"
105+
}
106+
}
107+
}

data ingestion model/README.md

Lines changed: 61 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -218,69 +218,67 @@ To run SCAFFOLD on sandbox data you need to prepare the environment and install
218218
Here is an example of the output from SCAFFOLD after processing the sandbox example data:
219219

220220
Successful: 100, Failed: 0
221+
| # | causal_pathway | count | % |
222+
| -- | --------------- | ----- | ---- |
223+
| 0 | Goal Approach | 10 | 10.0 |
224+
| 1 | Goal Gain | 3 | 3.0 |
225+
| 2 | Goal Loss | 7 | 7.0 |
226+
| 3 | Goal Worse | 1 | 1.0 |
227+
| 4 | Improving | 14 | 14.0 |
228+
| 5 | Social Approach | 20 | 20.0 |
229+
| 6 | Social Better | 1 | 1.0 |
230+
| 7 | Social Gain | 6 | 6.0 |
231+
| 8 | Social Loss | 13 | 13.0 |
232+
| 9 | Social Worse | 15 | 15.0 |
233+
| 10 | Worsening | 10 | 10.0 |
234+
235+
236+
| # | causal_pathway | acceptable | % acceptable | acceptable_score | selected | % selected | selected_score | % of acceptable selected |
237+
| -- | --------------- | ---------- | ------------ | ---------------- | -------- | ---------- | -------------- | ------------------------ |
238+
| 0 | Goal Approach | 36 | 1.0 | 2.82 | 10 | 10.0 | 2.98 | 27.8 |
239+
| 1 | Goal Gain | 53 | 1.4 | 2.44 | 3 | 3.0 | 2.78 | 5.7 |
240+
| 2 | Goal Loss | 129 | 3.5 | 2.34 | 7 | 7.0 | 2.89 | 5.4 |
241+
| 3 | Goal Worse | 563 | 15.2 | 2.21 | 1 | 1.0 | 2.89 | 0.2 |
242+
| 4 | Improving | 159 | 4.3 | 2.69 | 14 | 14.0 | 2.88 | 8.8 |
243+
| 5 | Social Approach | 104 | 2.8 | 2.80 | 20 | 20.0 | 2.96 | 19.2 |
244+
| 6 | Social Better | 352 | 9.5 | 2.27 | 1 | 1.0 | 2.65 | 0.3 |
245+
| 7 | Social Gain | 137 | 3.7 | 2.41 | 6 | 6.0 | 2.94 | 4.4 |
246+
| 8 | Social Loss | 229 | 6.2 | 2.39 | 13 | 13.0 | 2.93 | 5.7 |
247+
| 9 | Social Worse | 1696 | 45.8 | 2.20 | 15 | 15.0 | 2.83 | 0.9 |
248+
| 10 | Worsening | 246 | 6.6 | 2.63 | 10 | 10.0 | 2.83 | 4.1 |
249+
250+
| # | message | acceptable | % acceptable | acceptable_score | selected | % selected | selected_score | % of acceptable selected |
251+
| -- | -------------------------------------------- | ---------- | ------------ | ---------------- | -------- | ---------- | -------------- | ------------------------ |
252+
| 0 | Achieved Peer Average | 61 | 1.6 | 2.39 | 1 | 1.0 | 2.76 | 1.6 |
253+
| 1 | Achieved Top 10 Peer Benchmark | 76 | 2.1 | 2.42 | 5 | 5.0 | 2.98 | 6.6 |
254+
| 2 | Approach Goal | 36 | 1.0 | 2.82 | 10 | 10.0 | 2.98 | 27.8 |
255+
| 3 | Approach Peer Average | 21 | 0.6 | 2.79 | 1 | 1.0 | 3.39 | 4.8 |
256+
| 4 | Approach Top 10 Peer Benchmark | 83 | 2.2 | 2.81 | 19 | 19.0 | 2.94 | 22.9 |
257+
| 5 | Drop Below Goal | 129 | 3.5 | 2.34 | 7 | 7.0 | 2.89 | 5.4 |
258+
| 6 | Drop Below Peer Average | 136 | 3.7 | 2.36 | 4 | 4.0 | 2.94 | 2.9 |
259+
| 7 | Getting Worse | 246 | 6.6 | 2.63 | 10 | 10.0 | 2.83 | 4.1 |
260+
| 8 | No Longer Top Performer | 93 | 2.5 | 2.55 | 9 | 9.0 | 2.93 | 9.7 |
261+
| 9 | Not Top Performer | 848 | 22.9 | 2.20 | 7 | 7.0 | 2.82 | 0.8 |
262+
| 10 | Opportunity to Improve Goal | 563 | 15.2 | 2.21 | 1 | 1.0 | 2.89 | 0.2 |
263+
| 11 | Opportunity to Improve Top 10 Peer Benchmark | 848 | 22.9 | 2.20 | 8 | 8.0 | 2.85 | 0.9 |
264+
| 12 | Performance Improving | 159 | 4.3 | 2.69 | 14 | 14.0 | 2.88 | 8.8 |
265+
| 13 | Reached Goal | 53 | 1.4 | 2.44 | 3 | 3.0 | 2.78 | 5.7 |
266+
| 14 | Top Performer | 352 | 9.5 | 2.27 | 1 | 1.0 | 2.65 | 0.3 |
267+
268+
| # | measure | acceptable | % acceptable | acceptable_score | selected | % selected | selected_score | % of acceptable selected |
269+
| -- | --------------------- | ---------- | ------------ | ---------------- | -------- | ---------- | -------------- | ------------------------ |
270+
| 0 | Care-Rating-01 | 338 | 9.1 | 2.34 | 7 | 7.0 | 2.85 | 2.1 |
271+
| 1 | Clean-Rating-01 | 330 | 8.9 | 2.28 | 12 | 12.0 | 2.93 | 3.6 |
272+
| 2 | Discharge-01 | 299 | 8.1 | 2.27 | 10 | 10.0 | 2.91 | 3.3 |
273+
| 3 | Hand-01 | 287 | 7.7 | 2.33 | 5 | 5.0 | 2.88 | 1.7 |
274+
| 4 | Nurse-informed-01 | 270 | 7.3 | 2.34 | 7 | 7.0 | 2.90 | 2.6 |
275+
| 5 | Nurse-language-01 | 286 | 7.7 | 2.38 | 11 | 11.0 | 2.86 | 3.8 |
276+
| 6 | Patient-Concern-01 | 288 | 7.8 | 2.34 | 3 | 3.0 | 2.94 | 1.0 |
277+
| 7 | Physician-informed-01 | 295 | 8.0 | 2.24 | 9 | 9.0 | 2.85 | 3.1 |
278+
| 8 | Physician-language-01 | 299 | 8.1 | 2.30 | 5 | 5.0 | 2.92 | 1.7 |
279+
| 9 | Provider-Rating-01 | 264 | 7.1 | 2.32 | 6 | 6.0 | 2.87 | 2.3 |
280+
| 10 | Quiet-Rating-01 | 361 | 9.7 | 2.28 | 12 | 12.0 | 2.90 | 3.3 |
281+
| 11 | Transfer-01 | 387 | 10.4 | 2.24 | 13 | 13.0 | 2.97 | 3.4 |
221282

222-
| causal_pathway | count | % |
223-
|-----------------|-------|------|
224-
| Goal Approach | 11 | 11.0 |
225-
| Goal Gain | 3 | 3.0 |
226-
| Goal Loss | 7 | 7.0 |
227-
| Goal Worse | 1 | 1.0 |
228-
| Improving | 14 | 14.0 |
229-
| Social Approach | 18 | 18.0 |
230-
| Social Better | 1 | 1.0 |
231-
| Social Gain | 6 | 6.0 |
232-
| Social Loss | 13 | 13.0 |
233-
| Social Worse | 16 | 16.0 |
234-
| Worsening | 10 | 10.0 |
235-
236-
237-
| causal_pathway | acceptable | % acceptable | acceptable_score | selected | % selected | selected_score | % of acceptable selected |
238-
|-----------------|------------|--------------|-----------------|----------|------------|----------------|---------------------------|
239-
| Goal Approach | 36 | 1.0 | 2.78 | 11 | 11.0 | 2.90 | 30.6 |
240-
| Goal Gain | 53 | 1.4 | 2.43 | 3 | 3.0 | 2.78 | 5.7 |
241-
| Goal Loss | 129 | 3.5 | 2.32 | 7 | 7.0 | 2.89 | 5.4 |
242-
| Goal Worse | 563 | 15.2 | 2.19 | 1 | 1.0 | 2.89 | 0.2 |
243-
| Improving | 159 | 4.3 | 2.69 | 14 | 14.0 | 2.88 | 8.8 |
244-
| Social Approach | 104 | 2.8 | 2.77 | 18 | 18.0 | 2.86 | 17.3 |
245-
| Social Better | 352 | 9.5 | 2.30 | 1 | 1.0 | 2.65 | 0.3 |
246-
| Social Gain | 137 | 3.7 | 2.41 | 6 | 6.0 | 2.94 | 4.4 |
247-
| Social Loss | 229 | 6.2 | 2.37 | 13 | 13.0 | 2.93 | 5.7 |
248-
| Social Worse | 1696 | 45.8 | 2.18 | 16 | 16.0 | 2.81 | 0.9 |
249-
| Worsening | 246 | 6.6 | 2.63 | 10 | 10.0 | 2.83 | 4.1 |
250-
251-
252-
| message | acceptable | % acceptable | acceptable_score | selected | % selected | selected_score | % of acceptable selected |
253-
|----------------------------------------|------------|--------------|-----------------|----------|------------|----------------|---------------------------|
254-
| Achieved Peer Average | 61 | 1.6 | 2.38 | 1 | 1.0 | 2.78 | 1.6 |
255-
| Achieved Top 10 Peer Benchmark | 76 | 2.1 | 2.42 | 5 | 5.0 | 2.98 | 6.6 |
256-
| Approach Goal | 36 | 1.0 | 2.78 | 11 | 11.0 | 2.90 | 30.6 |
257-
| Approach Peer Average | 21 | 0.6 | 2.76 | 0 | 0.0 | NaN | 0.0 |
258-
| Approach Top 10 Peer Benchmark | 83 | 2.2 | 2.77 | 18 | 18.0 | 2.86 | 21.7 |
259-
| Drop Below Goal | 129 | 3.5 | 2.32 | 7 | 7.0 | 2.89 | 5.4 |
260-
| Drop Below Peer Average | 136 | 3.7 | 2.34 | 4 | 4.0 | 2.94 | 2.9 |
261-
| Getting Worse | 246 | 6.6 | 2.63 | 10 | 10.0 | 2.83 | 4.1 |
262-
| No Longer Top Performer | 93 | 2.5 | 2.51 | 9 | 9.0 | 2.93 | 9.7 |
263-
| Not Top Performer | 848 | 22.9 | 2.18 | 7 | 7.0 | 2.76 | 0.8 |
264-
| Opportunity to Improve Goal | 563 | 15.2 | 2.19 | 1 | 1.0 | 2.89 | 0.2 |
265-
| Opportunity to Improve Top 10 Peer Benchmark | 848 | 22.9 | 2.18 | 9 | 9.0 | 2.84 | 1.1 |
266-
| Performance Improving | 159 | 4.3 | 2.69 | 14 | 14.0 | 2.88 | 8.8 |
267-
| Reached Goal | 53 | 1.4 | 2.43 | 3 | 3.0 | 2.78 | 5.7 |
268-
| Top Performer | 352 | 9.5 | 2.30 | 1 | 1.0 | 2.65 | 0.3 |
269-
270-
271-
| measure | acceptable | % acceptable | acceptable_score | selected | % selected | selected_score | % of acceptable selected |
272-
|------------------------|-------------|---------------|------------------|-----------|-------------|----------------|---------------------------|
273-
| Care-Rating-01 | 338 | 9.1 | 2.33 | 8 | 8.0 | 2.84 | 2.4 |
274-
| Clean-Rating-01 | 330 | 8.9 | 2.26 | 12 | 12.0 | 2.88 | 3.6 |
275-
| Discharge-01 | 299 | 8.1 | 2.25 | 10 | 10.0 | 2.85 | 3.3 |
276-
| Hand-01 | 287 | 7.7 | 2.34 | 5 | 5.0 | 2.88 | 1.7 |
277-
| Nurse-informed-01 | 270 | 7.3 | 2.33 | 6 | 6.0 | 2.86 | 2.2 |
278-
| Nurse-language-01 | 286 | 7.7 | 2.37 | 11 | 11.0 | 2.82 | 3.8 |
279-
| Patient-Concern-01 | 288 | 7.8 | 2.34 | 3 | 3.0 | 2.94 | 1.0 |
280-
| Physician-informed-01 | 295 | 8.0 | 2.23 | 9 | 9.0 | 2.85 | 3.1 |
281-
| Physician-language-01 | 299 | 8.1 | 2.28 | 5 | 5.0 | 2.92 | 1.7 |
282-
| Provider-Rating-01 | 264 | 7.1 | 2.31 | 6 | 6.0 | 2.87 | 2.3 |
283-
| Quiet-Rating-01 | 361 | 9.7 | 2.25 | 12 | 12.0 | 2.84 | 3.3 |
284-
| Transfer-01 | 387 | 10.4 | 2.22 | 13 | 13.0 | 2.92 | 3.4 |
285283

286284
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

Comments
 (0)