Skip to content

Conversation

GnautSpace
Copy link

Description

Created a helper function create_document_reference_content for creating DocumentReferenceContent objects

Related Issue

Resolves #138

Changes Made

  • add create_document_reference_content() helper following existing patterns
  • supports text/plain, text/html, application/pdf and other MIME types
  • includes comprehensive docstring with usage examples
  • add unit tests for data, URL, language, and kwargs scenarios
  • export function in healthchain/fhir/init.py

Testing

  • all necessary imports are present (Coding is imported)
  • create_document_reference_content is imported from helpers
  • all 4 test functions are present:
    - test_create_document_reference_content_with_data()
    - test_create_document_reference_content_with_url()
    - test_create_document_reference_content_custom_language()
    - test_create_document_reference_content_with_kwargs()
  • tests follow existing patterns and are comprehensive

Checklist

  • [x ] I have read the contributing guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • [x ] My changes generate no new warnings
  • [x ] I have added tests that prove my fix is effective or that my feature works
  • [x ] New and existing unit tests pass locally with my changes

Additional Notes

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.

Add helper function to create FHIR DocumentReferenceContent

1 participant