Skip to content

Conversation

@almas-liaqat
Copy link
Contributor

Summary

  • Routine Change
  • ❗ Breaking Change
  • 🤖 Operational or Infrastructure Change
  • ✨ New Feature
  • ⚠️ Potential issues that might be caused by this change

Add any other relevant notes or explanations here. Remove this line if you have nothing to add.

Reviews Required

  • Dev
  • Test
  • Tech Author
  • Product Owner

Review Checklist

ℹ️ This section is to be filled in by the reviewer.

  • I have reviewed the changes in this PR and they fill all or part of the acceptance criteria of the ticket, and the code is in a mergeable state.
  • If there were infrastructure, operational, or build changes, I have made sure there is sufficient evidence that the changes will work.
  • I have ensured the changelog has been updated by the submitter, if necessary.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 2, 2023

This branch is work on a ticket in the NHS Digital VTX JIRA Project. Here's a handy link to the ticket:

@almas-liaqat almas-liaqat force-pushed the AMB-1769-Convert-MESH-CSV-records-to-FHIR-objects branch from 59c9aa7 to 195e743 Compare November 2, 2023 13:22
@github-actions
Copy link
Contributor

github-actions bot commented Nov 2, 2023

This branch is work on a ticket in the NHS Digital VTX JIRA Project. Here's a handy link to the ticket:

@github-actions
Copy link
Contributor

github-actions bot commented Nov 2, 2023

This branch is work on a ticket in the NHS Digital VTX JIRA Project. Here's a handy link to the ticket:

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2023

This branch is work on a ticket in the NHS Digital VTX JIRA Project. Here's a handy link to the ticket:

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2023

This branch is work on a ticket in the NHS Digital VTX JIRA Project. Here's a handy link to the ticket:

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2023

This branch is work on a ticket in the NHS Digital VTX JIRA Project. Here's a handy link to the ticket:

def validate_route_of_vaccination_code(cls, v, values):

if "NOT_GIVEN" in values:
if not Constants.if_vaccine_not_give(values["NOT_GIVEN"]):
Copy link
Contributor

Choose a reason for hiding this comment

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

I think Constant class and all its methods can be moved into ImmunizationModel as static method. Also ImmunizationModel is related only to CSV record. I think the name of the class should reflect that. If we call it ImmunisationModel then it'll be mixed with the FHIR Immunization.

return immunisation_failure


def read_csv_to_model(
Copy link
Contributor

Choose a reason for hiding this comment

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

This function shouldn't expect a file. This code should perform under the assumption that it receives the content as string. You can read a file during test and pass it to this function. If this function assumes file then, we can't use it in the actual implementation because the content comes from S3 not reading a file.

self.mesh_output = MeshOutputHandler(self.bucket, self.key)

@mock_s3
def test_write_to_s3(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the purpose of this test? If we want to make sure that the content is written back, then we need to mock the MeshOutputHandler and assert if the write report has been called.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this one is yours

immunisation_records[0].dict(), indent=4, default=str
)

assert json.loads(immunisation_record_json) == json.loads(
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use unittest assertions. They'll give you diff and they're integrated with the test-runner. Like self.assertDictEqual() .

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this file still necessary? It's called old 😄

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please remove all the TODOs if they are not relevant anymore. Only keep the one that still needs addressing. For example you create an Error class which means the one that's in this file is not used anymore.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2023

This branch is work on a ticket in the NHS Digital VTX JIRA Project. Here's a handy link to the ticket:

@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2023

This branch is work on a ticket in the NHS Digital VTX JIRA Project. Here's a handy link to the ticket:

@nathanwall nathanwall merged commit 5c25dcf into master Nov 9, 2023
@nathanwall nathanwall deleted the AMB-1769-Convert-MESH-CSV-records-to-FHIR-objects branch November 9, 2023 13:43
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.

3 participants