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

Adds support for retrieving file uploads in doctor notes #2291

Closed

Conversation

UdaySagar-Git
Copy link
Contributor

Proposed Changes

  • Adds support to retrieve uploaded files in doctor notes

Associated Issue

linked to the part of Frontend pr : ohcnetwork/care_fe#8070

Architecture changes

  • Remove this section if not used

Merge Checklist

  • Tests added/fixed
  • Update docs in /docs
  • Linting Complete
  • Any other necessary step

Only PR's with test cases included and passing lint and test pipelines will be reviewed

@coronasafe/care-backend-maintainers @coronasafe/care-backend-admins

@UdaySagar-Git UdaySagar-Git requested a review from a team as a code owner July 5, 2024 21:28
@UdaySagar-Git UdaySagar-Git changed the title Adds support for retrieving file uploads in doctore notes Adds support for retrieving file uploads in doctor notes Jul 6, 2024
@@ -509,6 +510,15 @@ class PatientNotesSerializer(serializers.ModelSerializer):
thread = serializers.ChoiceField(
choices=PatientNoteThreadChoices, required=False, allow_null=False
)
files = serializers.SerializerMethodField()

def get_files(self, obj):
Copy link
Member

Choose a reason for hiding this comment

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

This serves a lot of internal metadata about the row which is not needed.

@@ -139,6 +139,7 @@ class FileType(models.IntegerChoices):
COMMUNICATION = 6, "COMMUNICATION"
CONSENT_RECORD = 7, "CONSENT_RECORD"
ABDM_HEALTH_INFORMATION = 8, "ABDM_HEALTH_INFORMATION"
NOTES = 9, "NOTES"
Copy link
Member

Choose a reason for hiding this comment

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

How can we retrieve the files? there is no authz implemented for the same.

@UdaySagar-Git
Copy link
Contributor Author

@vigneshhari can you review this instead
#2295

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants