Skip to content

Overhaul entities sample to use new schema guidelines - #6581

Merged
kmoscoe merged 48 commits into
datacommonsorg:masterfrom
kmoscoe:samples
Sep 22, 2026
Merged

kmoscoe merged 48 commits into
datacommonsorg:masterfrom
kmoscoe:samples

Conversation

@kmoscoe

@kmoscoe kmoscoe commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

kmoscoe added 30 commits March 16, 2026 15:25
This reverts commit 6c875ed.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request updates the sample entity data and schema definitions to comply with new project-wide schema guidelines. The changes involve restructuring the MCF files and updating the corresponding CSV data entries to ensure alignment with the new naming conventions and data modeling standards.

Highlights

  • Schema Migration: Updated entity definitions and statistical variables to align with new schema guidelines, including the migration from 'variables.mcf' to 'schema.mcf'.
  • Data Normalization: Renamed variables in the CSV data to match the updated schema definitions for better consistency and readability.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@kmoscoe
kmoscoe requested a review from carojahn August 12, 2026 19:52

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Alaska hospitals unplanned visits dataset and its schema. It renames the variables in the CSV file to use more descriptive names (e.g., changing EDAC_30_AMI_TOTAL to Count_Patients_HeartAttack) and introduces a new schema.mcf file that models these variables using structured classes and properties. A review comment correctly points out a typo in schema.mcf where measuredProperty is incorrectly defined as dcid:cma/medicalCondition instead of dcid:medicalCondition.

Comment thread custom_dc/sample/entities/schema.mcf Outdated
Comment thread custom_dc/sample/entities/schema.mcf

@carojahn carojahn left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left one comment - not strongly opinionated but curious to get your take on why you made it a separate populationType

@kmoscoe
kmoscoe requested a review from carojahn August 21, 2026 17:25
@kmoscoe
kmoscoe enabled auto-merge (squash) September 14, 2026 20:12
@kmoscoe

kmoscoe commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Left one comment - not strongly opinionated but curious to get your take on why you made it a separate populationType

@kmoscoe kmoscoe closed this Sep 14, 2026
auto-merge was automatically disabled September 14, 2026 20:17

Pull request was closed

@kmoscoe kmoscoe reopened this Sep 14, 2026
CCN21310,2023-06-30,EDAC_30_PN_TOTAL,,P3Y
CCN21310,2023-06-30,EDAC_30_PN_RETURN,,P3Y
CCN20001,2023-06-30,Count_Patients_HeartAttack,432,P3Y
CCN20001,2023-06-30,Count_HeartAttack_ReturnPatients,92,P3Y

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am assuming that these StatVars without Patient are the count of "heart attack occurrences"? While something like "count_patients_heartattack" measures the actual number of patients?

Wondering if there is a need to aggregate across all diseases for "count_heartattack_returnpatients" and others, in which case an alternative could be "count_medicalcondition_returningpatient_heartattack". Not strongly opinionated but curious how we'd justify the condition as a constraint in one and populationType in the other.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, both of these measures just record the actual number of patients, both returned and not returned. The actual EDAC (excess days in acute measure), which is the principal measure, and measures just the additional days of the returned patients, is not included here. Maybe I should do so to make it clearer, WDYT?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(The original naming I used was actually misleading.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, the CMS keeps those 3 medical conditions as separate metrics. So I think they're not being compared to anything else.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, in fact the EDAC is really the primary measure: https://qualitynet.cms.gov/inpatient/measures/edac. The patient counts are more like "additional info". So I definitely need to rework this. Thanks a lot for pointing it out -- not sure what I was thinking!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I've now added new statvars for the actual time measurement. It made more sense to keep regular patients and return patients as separate classes because the duration metrics only relate to return patients.

@kmoscoe
kmoscoe marked this pull request as draft September 14, 2026 21:19
@kmoscoe
kmoscoe marked this pull request as ready for review September 15, 2026 23:29

@gmechali gmechali left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good from my perspective.

@carojahn carojahn left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

discussed offline, single enum for a constraint property doesn't make sense.

@kmoscoe
kmoscoe merged commit d55099a into datacommonsorg:master Sep 22, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants