Prep and NLP API output
If you already use the Prep API or the NLP API, you can send what they produced straight to the Summarization API, without reshaping it.
Prep API output: prep_documents
The Prep API can produce a JSONL file with one document per line: its text, its document type and its metadata. Parse each line and send the objects as an array:
Each line becomes a document:
Other fields are ignored.
Remove the pdf field first. Each line also carries the original document as
a base64 PDF. It is not used — the text is — and it makes the request around a
hundred times larger. A line with a PDF and no text is refused with
unsupported_document.
NLP API results: nlp_results
If you have already run the documents through the NLP API, send its result files
as they are — emtellipro-json-2, including the documents’ text (the NLP API’s
text feature). Several files are fine:
Each document’s id, category and subcategory come from the file. Documents whose
processing_status is not success are summarized too.
NLP results are large — many times the size of their text — so these requests can be up to 16 MiB.
Adding dates and patient details: document_metadata
NLP results carry no dates or patient details. Add them by document id with
document_metadata, which works for any of a job’s documents:
A key that matches no document is refused with unknown_document_id.
If you have both the Prep JSONL and the NLP results for the same documents, their
ids match: send the NLP results, and build document_metadata from the Prep
lines’ chartdate and subject_* fields.
Combining
documents, prep_documents and nlp_results can all be sent in one job. Ids
must be unique across them; documents without an id are numbered by their
position across all of them, in that order.

