import type { OperationOutcome, OperationOutcomeIssue, Questionnaire, QuestionnaireItem, QuestionnaireResponse, QuestionnaireResponseItem } from 'fhir/r4'; import type { RegexValidation } from '../interfaces/regex.interface'; export declare enum ValidationResult { unknown = "unknown",// Unknown validation result questionnaireNotFound = "questionnaireNotFound",// The Questionnaire referenced by the QR was not found questionnaireInactive = "questionnaireInactive",// The QuestionnaireResponse.authored is outside the defined Questionnaire.effectivePeriod questionnaireDraft = "questionnaireDraft",// The Questionnaire.status was not active (draft) questionnaireRetired = "questionnaireRetired",// The Questionnaire.status was not active (retired) invalidLinkId = "invalidLinkId",// LinkId was not found in the questionnaire invalidType = "invalidType",// The Question Type should not be included in Response (or Definition) data invalidAnswerType = "invalidAnswerType",// The Answer does not conform to the Item.Type value required (also taking into consideration the fhir-type extension) invalidAnswerOption = "invalidAnswerOption",// A set of valid AnswerOptions were provided in the definition, but the value entered was not in the set exclusiveAnswerOption = "exclusiveAnswerOption",// The selected answer cannot be used in conjunction with other answers in this multi-select choice option invalidUrlValue = "invalidUrlValue",// URL value not formatted correctly as a UUID, or relative/absolute URL groupShouldNotHaveAnswers = "groupShouldNotHaveAnswers",// A Group Item should not use the `answer` child, it should use the `item` child required = "required",// There was no answer provided for a mandatory field invariant = "invariant",// A FHIRPATH validation expression did not pass invariantExecution = "invariantExecution",// A FHIRPATH validation expression failed to execute repeats = "repeats",// There was more than one answer provided for an item with repeats = false (which is the default) minCount = "minCount",// Minimum number of answers required for the item was not provided maxCount = "maxCount",// Number of answers provided exceeded the maximum permitted minValue = "minValue",// Minimum value constraint violated maxValue = "maxValue",// Maximum value constraint violated maxDecimalPlaces = "maxDecimalPlaces",// Maximum decimal places constraint violated minLength = "minLength",// Minimum length constraint violated maxLength = "maxLength",// Maximum length constraint violated invalidNewLine = "invalidNewLine",// 'string' type items cannot include newline characters, use a 'text' type for these invalidCoding = "invalidCoding",// Coding value not valid in the ValueSet tsError = "tsError",// Error accessing the Terminology Server maxAttachmentSize = "maxAttachmentSize",// Maximum attachment size constraint violated attachmentSizeInconsistent = "attachmentSizeInconsistent",// The Size of the attachment data and the reported size are different invalidAttachmentType = "invalidAttachmentType",// Attachment type constraint violated displayAnswer = "displayAnswer",// Display Items should not have an answer provided regex = "regex",// The answer does not match the provided regex expression regexTimeout = "regexTimeout",// Evaluating the regex expression timed out invalidRefValue = "invalidRefValue",// The Reference value was not a valid URL value (relative or absolute) invalidRefResourceType = "invalidRefResourceType",// The Reference value did not refer to a valid FHIR resource type invalidRefResourceTypeRestriction = "invalidRefResourceTypeRestriction",// The Reference value was not minValueIncompatUnits = "minValueIncompatUnits",// The units provided in the Quantity cannot be converted to the min Quantity units maxValueIncompatUnits = "maxValueIncompatUnits",// The units provided in the Quantity cannot be converted to the max Quantity units invalidUnit = "invalidUnit",// The unit provided was not among the list selected (or did not have all the properties defined in the unit coding) invalidUnitValueSet = "invalidUnitValueSet",// The unit provided was not in the provided valueset minQuantityValue = "minQuantityValue",// Minimum Quantity value constraint violated maxQuantityValue = "maxQuantityValue" } export declare function validateForm(questionnaire: Questionnaire, questionnaireResponse: QuestionnaireResponse): Record; export declare function validateTargetConstraint(): Record; interface ValidateQuestionnaireResponseParams { questionnaire: Questionnaire; questionnaireResponse: QuestionnaireResponse; } /** * Recursively go through the questionnaireResponse and check for un-filled required qItems * At the moment item.required for group items are not checked * * @author Sean Fong */ export declare function validateQuestionnaireResponse(params: ValidateQuestionnaireResponseParams): Record; interface GetInputInvalidTypeParams { qItem: QuestionnaireItem; input: string; regexValidation?: RegexValidation; minLength?: number; maxLength?: number; maxDecimalPlaces?: number; minValue?: string | number; maxValue?: string | number; minQuantityValue?: number; maxQuantityValue?: number; } export declare function getInputInvalidType(getInputInvalidTypeParams: GetInputInvalidTypeParams): ValidationResult | null; export declare function createValidationOperationOutcome(error: ValidationResult, qItem: QuestionnaireItem | null, qrItem: QuestionnaireResponseItem | null, answerIndex: number | null, locationExpression: string, existingOperationOutcomeIssues?: OperationOutcomeIssue[], severity?: 'error' | 'warning', humanReadable?: string): OperationOutcome; export {};