Skip to content

[NDR-29] Search document refactoring#621

Merged
NogaNHS merged 28 commits intomainfrom
NDR-29
Jun 4, 2025
Merged

[NDR-29] Search document refactoring#621
NogaNHS merged 28 commits intomainfrom
NDR-29

Conversation

@NogaNHS
Copy link
Copy Markdown
Contributor

@NogaNHS NogaNHS commented Apr 24, 2025

No description provided.

DocRefClient = {
"err_code": "DRS_5001",
"message": "An error occurred when searching for available documents",
"fhir_coding": FhirIssueCoding.NOT_FOUND,
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.

Is this the correct FhirIssueCoding,

The message seems vague the coding seems specific

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.

It would be an internal error. Which error code do you think is better suited?
https://build.fhir.org/codesystem-issue-type.html

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.

<system value="http://hl7.org/fhir/issue-type">
<code value="exception">
<display value="Exception">

Comment on lines +97 to +100
def _fetch_documents(self, nhs_number: str, table_name: str, filter_expression):
return self.fetch_documents_from_table_with_nhs_number(
nhs_number, table_name, query_filter=filter_expression
)
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.

It feels a little bit overkill to have a _fetch_document followed by a _fetch_with_nhs_number method where the NHS Number is a required argument anyway.

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.

Done

attachment=document_details,
)
.create_minimal_fhir_document_reference_object()
.create_general_fhir_document_reference_object(document_reference)
Copy link
Copy Markdown
Contributor

@robg-nhs robg-nhs May 28, 2025

Choose a reason for hiding this comment

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

I feel general is a bit superflous.
create_fhir_document_reference_object should do

NogaNHS added 2 commits June 4, 2025 14:39
# Conflicts:
#	lambdas/utils/decorators/validate_patient_id.py
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