Skip to main content

clinik.labs

create

const { data, meta } = await clinik.labs.create(request: LabCreateRequest): Promise<ApiResponse<DiagnosticReport>>
FieldTypeRequiredDescription
statusstringYesregistered, partial, preliminary, final, amended, corrected, appended, cancelled
codestring | { system?, code, display? }YesLOINC report type
patientIdstringYesPatient reference
encounterIdstringNoEncounter reference
effectiveDateTimestringNoClinically relevant time (point in time)
effectivePeriod{ start?, end? }NoClinically relevant time (range)
resultIdsstring[]NoObservation IDs in this report
categorystringNoLAB, RAD, PAT
conclusionstringNoClinical conclusion text
conclusionCodesArray<{ system?, code, display? }>NoSNOMED findings
performerstringNoWho performed the diagnostic
resultsInterpreterstringNoWho interpreted results
specimenIdsstring[]NoSpecimen references
presentedFormArray<{ contentType, data?, url?, title? }>NoAttached documents
basedOnstring[]NoServiceRequest IDs this report is based on
mediaArray<{ comment?, linkId }>NoMedia/images linked to this report

read

Supports _include for referenced observations:
const { data } = await clinik.labs.read('lab_abc123', {
  include: ['Observation'],
});

update

const { data, meta } = await clinik.labs.update(id: string, request: LabUpdateRequest): Promise<ApiResponse<DiagnosticReport>>
Updatable fields: status, conclusion, conclusionCodes, resultIds, resultsInterpreter, presentedForm, effectiveDateTime, effectivePeriod. Same pattern as other resources.