-
Notifications
You must be signed in to change notification settings - Fork 14
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
Conditions Endpoint #2934
base: main
Are you sure you want to change the base?
Conditions Endpoint #2934
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not super familiar with the part of the code base, so just commenting
containers/ecr-viewer/src/app/api/save-fhir-data/save-fhir-data-service.ts
Outdated
Show resolved
Hide resolved
containers/ecr-viewer/src/app/api/save-fhir-data/save-fhir-data-service.ts
Outdated
Show resolved
Hide resolved
containers/ecr-viewer/src/app/api/save-fhir-data/save-fhir-data-service.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but just a couple of small nits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of copying this file here, can we update the docker-compose to copy the real one? I believe you'll need to update test_type_system
and test_result_qualitative
in that one too.
- ./sql/extended.sql:/var/opt/mssql/scripts/extended.sql
case "sqlserver": | ||
return await get_conditions_sqlserver(); | ||
default: | ||
return NextResponse.json({ message: "Invalid source" }, { status: 500 }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we have another variable called "source", could we update this error to specifically say Invalid metadata database type
?
let pool = await sql.connect({ | ||
user: process.env.SQL_SERVER_USER, | ||
password: process.env.SQL_SERVER_PASSWORD, | ||
server: process.env.SQL_SERVER_HOST || "localhost", | ||
options: { | ||
trustServerCertificate: true, | ||
}, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we initialize this connection in this file and in save-fhir-data-service.ts can we just pull this out into a single file like we do for postgres?
PULL REQUEST
Summary
Adds
/api/conditions
endpoint to get a list of the conditions in ecr-viewer. This returns a list of condition names found in theecr_rr_conditions
table.Related Issue
Fixes #2749
Acceptance Criteria
Additional Information
To test with Postgres and the core metadata schema you'll need the following variables in your
.env.local
:And for SQL Server and the extended metadata schema:
In addition, to populate SQL Server you will need to modify the orchestration configs (
save-bundle-to-ecr-viewer.json
, andsave-eicr-to-ecr-viewer-config.json
) the seed data script uses to use thephilly_ecr.json
message-parser config. E.g.:Checklist