Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(practitioner): migrate Practitioner.name.family to unified type #7632

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

makelicious
Copy link
Collaborator

Issue:

  1. At least on versions 1.2 - 1.2.1 Practitioner.name[elem].family used to be string[]
  2. At some stage, probably during 2023, value changed to string
  3. Mismatch created issues during data indexing.

Solution:
Create migration to map the value to string.

@makelicious makelicious added this to the v1.6.0 milestone Sep 19, 2024
Copy link

Oops! Looks like you forgot to update the changelog. When updating CHANGELOG.md, please consider the following:

  • Changelog is read by country implementors who might not always be familiar with all technical details of OpenCRVS. Keep language high-level, user friendly and avoid technical references to internals.
  • Answer "What's new?", "Why was the change made?" and "Why should I care?" for each change.
  • If it's a breaking change, include a migration guide answering "What do I need to do to upgrade?".

await session.withTransaction(async () => {
await db
.collection('Practitioner')
.updateMany({ 'name.family': { $type: 'array' } }, [
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If there is a simpler way of doing it, I will appreciate tips.

@makelicious makelicious merged commit a62c4e6 into develop Sep 20, 2024
31 of 39 checks passed
makelicious added a commit that referenced this pull request Sep 20, 2024
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.

2 participants