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

Natality support #93

Merged
merged 15 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
## Changelog

### v1.3.0 - 2024-08-29
* Add support for Natality Messaging
* Add configuration to enable or disable Natality Messaging
* Update BFDR to v1.0.0-preview.7 and VRDR to v4.3.0
* Use message header validation from vrdr-dotnet library
* Add POST and GET route handling for vital record type and IG version number, ex. MA/Bundle/BFDR/v2.0
* Validate the record aligns with the url vital record type on POST
* Return record submissions based on record type on GET

### v1.2.2 - 2024-08-27
* Update library v4.2.2

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ library for parsing and constructing messages.
This implementation describes the NVSS API hosted by NCHS and the compatible implementation hosted
via the STEVE 2.0 system.

This version of the API uses [VRDR.Messaging 4.3.0](https://www.nuget.org/packages/VRDR.Messaging/4.3.0) and [BFDR.Messaging 1.0.0-preview.7](https://www.nuget.org/packages/BFDR.Messaging/1.0.0-preview.7)

# The NVSS API

The NVSS API can be accessed by vital records jurisdictions in order to submit mortality data to
Expand Down
355 changes: 348 additions & 7 deletions messaging.tests/Integration/BundlesControllerTests.cs

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions messaging.tests/Integration/SteveEndpointTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ public async Task SteveRetrieveSteveSubmission()
recordSubmission.MessageSource = "http://example.fhir.org";
recordSubmission.CertNo = 1;
recordSubmission.JurisdictionId = "NY";
recordSubmission.DeathYear = 2024;

HttpResponseMessage submissionMessage = await JsonResponseHelpers.PostJsonAsync(_client, STEVE_ENDPOINT, recordSubmission.ToJson());
Assert.Equal(HttpStatusCode.NoContent, submissionMessage.StatusCode);
Expand All @@ -213,7 +214,7 @@ public async void PostWithInvalidJurisdictionGetsError()
DatabaseHelper.ResetDatabase(_context);

string badJurisdiction = "AB";
Assert.False(VRDR.MortalityData.Instance.JurisdictionCodes.ContainsKey(badJurisdiction));
Assert.False(VR.IJEData.Instance.JurisdictionCodes.ContainsKey(badJurisdiction));

// Create a new empty Death Record
DeathRecordSubmissionMessage recordSubmission = new DeathRecordSubmissionMessage(new DeathRecord());
Expand All @@ -227,7 +228,7 @@ public async void PostWithInvalidJurisdictionGetsError()
public async void GetWithInvalidJurisdictionGetsError()
{
string badJurisdiction = "AB";
Assert.False(VRDR.MortalityData.Instance.JurisdictionCodes.ContainsKey(badJurisdiction));
Assert.False(VR.IJEData.Instance.JurisdictionCodes.ContainsKey(badJurisdiction));

HttpResponseMessage response = await _client.GetAsync($"/STEVE/{badJurisdiction}/Bundle");
Assert.Equal(HttpStatusCode.BadRequest, response.StatusCode);
Expand Down
1,062 changes: 1,062 additions & 0 deletions messaging.tests/fixtures/json/BatchSingleBirthMessage.json

Large diffs are not rendered by default.

1,049 changes: 1,049 additions & 0 deletions messaging.tests/fixtures/json/BirthRecordSubmissionMessage.json

Large diffs are not rendered by default.

1,049 changes: 1,049 additions & 0 deletions messaging.tests/fixtures/json/BirthRecordSubmissionMessageInvalidCertNo.json

Large diffs are not rendered by default.

1,049 changes: 1,049 additions & 0 deletions messaging.tests/fixtures/json/BirthRecordUpdateMessage.json

Large diffs are not rendered by default.

Loading
Loading