opensrp/fhircore

PDF generation can process multiple QRs

Closed this issue · 1 comments

Describe the feature request.
Right now to generate a PDF, you can only pass 1 QR. Now we need them to be multiple.

Additional context
N/A

Acceptance criteria

  • Ensure it's possible to pass multiple QRs to the HtmlPopulator class

Area path to review

  1. Define a html that has 2 use of tags to retrieve information from 2 different QRs
  2. Pass 2 different QRs to the HtmlPopulator class
  3. Process the html
  4. The 2 tag should be able to retrieve the right information even though it's from 2 different QRs

Implementation plan (For Engineers)

  • Refactor the pdf configs, which initially in the QuestionnaireConfig, but now will have it's own config called PdfConfig
  • Allow passing multiple QRs when initiating HtmlPopulator class
  • Update how we keep a pair of link-id and answer item into this format questionnaire-id/link-id, previously it was simply link-id since there's only 1 QR
  • Update the submitted-date tag to accept a questionnaire-id, since the HtmlPopulator class can now process multiple QRs

closed by #3498