@medic/cht-datasource
    Preparing search index...

    Function create

    • Returns a function for creating a report from the given data context.

      Parameters

      Returns (input: ReportInput) => Promise<Report.v1.Report>

      a function for creating a report.

        • (input: ReportInput): Promise<Report.v1.Report>
        • Creates a new report record.

          Parameters

          Returns Promise<Report.v1.Report>

          the created report record

          InvalidArgumentError if form is not provided or is not a supported form id

          InvalidArgumentError if contact is not provided or is not the identifier of a valid contact

          InvalidArgumentError if the provided reported_date is not in a valid format. Valid formats are 'YYYY-MM-DDTHH:mm:ssZ', 'YYYY-MM-DDTHH:mm:ss.SSSZ', or .

      Error if a data context is not provided