Open mradamcox opened 3 days ago
@mradamcox , I noticed that the sdoh_featured_variable_s field is missing in both aardvark_schema.json and sdohplace_schema.json. I can add this field to sdohplace_schema.json. Just to confirm, should it be similar to:
data_usage_notes": {
"label": "Data Usage Notes",
"uri": "sdoh_data_usage_notes_s",
"data_type": "string",
"multiple": false,
"obligation": "optional",
"controlled": false,
"controlled_options": [],
"schema": "SDOH Place",
"display_group": "SDOH Place Project",
"slug": "data-usage-notes",
"widget": "text-area.html"
}
right?
Ah, good catch. I forgot we have those schema files in this repo as well. Are they used for lookups? Here is the current schema file that we use in the metadata manager: https://github.com/healthyregions/SDOHPlace-MetadataManager/blob/main/manager/metadata/schemas/sdohplace.json.
Honestly it would be best to perhaps download that file into this repo at build time, so are not storing two versions of the schema in different places. Also, I'm sure we are no longer (or shouldn't be, at least) using the aardvark_schema.json file in this repo, and it can be removed.
Edit: You'll notice the shape of the schema file is a little different now, but the fields themselves still have all the same attributes.
Ah I see. Yes, there's a lookup to retrieve the corresponding variables from the schema file in the metadata folder. I can change it to fetch from https://github.com/healthyregions/SDOHPlace-MetadataManager/blob/main/manager/metadata/schemas/sdohplace.json if necessary, although it may introduce some data loading time. I don't think any modifications to the Solr object are needed, as all previous attributes are still present.
Sounds good, I'll leave it up to you whether to fetch the file now or not, what ever is quickest. We can also just look at this in the future to find a strategy for de-duplication, no need to take care of that now.
There are a few small changes @Makosak and I had discussed that we should implement on the frontend.
sdoh_featured_variable_s
and it's alias isfeatured_variable
(I don't recall if aliases are used on the frontend, but just in case).Once we have a PR for this, we can solicit feedback for these labels from others, and perhaps they will be updated a bit.