import type { Element, Extension, QuestionnaireItem, QuestionnaireItemAnswerOption } from 'fhir/r4'; import type { RegexValidation } from '../interfaces/regex.interface'; export declare function hasDisplayCategory(qItem: QuestionnaireItem): boolean; export declare function hasItemControl(qItem: QuestionnaireItem): boolean; export declare function shouldRenderNestedItems(qItem: QuestionnaireItem): boolean; /** * Check if the extension has an itemControl code equal to the given itemControlCode * * @author Sean Fong */ export declare function isSpecificItemControl(qItem: QuestionnaireItem, itemControlCode: string): boolean; /** * Check if the extension has an displayCategory code equal to the given displayCategory * * @author Sean Fong */ export declare function isSpecificDisplayCategory(qItem: QuestionnaireItem, displayCategoryCode: string): boolean; /** * Check if the extension has url for items that use shortText * * @author Sean Fong */ export declare function getShortText(qItem: QuestionnaireItem): string | null; /** * Check if the extension has url for items that use open label * Default open label text to "Other" * * @author Sean Fong */ export declare function getOpenLabelText(qItem: QuestionnaireItem): string; /** * Check if the decimal value has a quantity precision for the decimal value * * @author Sean Fong */ export declare function getDecimalPrecision(qItem: QuestionnaireItem): number | null; export declare function getXHtmlStringFromExtension(extensions: Extension[]): string | null; /** * Check if the extension has a url for xhtml rendering * * @author Sean Fong */ export declare function getXHtmlString(qItem: QuestionnaireItem): string | null; /** * Check if the item label (text) has a valueMarkdown extension * * @author Sean Fong */ export declare function getMarkdownString(element: Element | undefined): string | null; /** * Get text display prompt for items with itemControlCode prompt and has a prompt childItem * * @author Sean Fong */ export declare function getTextDisplayPrompt(qItem: QuestionnaireItem): string; /** * Get Quantity unit for items with itemControlCode unit and has a unit childItem * * Example extension: * { * "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unit", * "valueCoding": { * "system": "http://unitsofmeasure.org", * "code": "kg", * "display": "kg" * } * } * * Example Output (omit the url): * { * "valueCoding": { * "system": "http://unitsofmeasure.org", * "code": "kg", * "display": "kg" * } * } * * @author Sean Fong */ export declare function getQuantityUnit(qItem: QuestionnaireItem): QuestionnaireItemAnswerOption | null; /** * Get decimal text display unit for items with itemControlCode unit and has a unit childItem * * @author Sean Fong */ export declare function getTextDisplayUnit(qItem: QuestionnaireItem): string; /** * Get text display lower bound for items with itemControlCode "lower" and has a "lower" childItem * * @author Sean Fong */ export declare function getTextDisplayLower(qItem: QuestionnaireItem): string; /** * Get text display upper bound for items with itemControlCode "upper" and has a "upper" childItem * * @author Sean Fong */ export declare function getTextDisplayUpper(qItem: QuestionnaireItem): string; /** * Get text display instructions for items with itemControlCode instructions and has an instructions childItem * * @author Sean Fong */ export declare function getTextDisplayInstructions(qItem: QuestionnaireItem): string; /** * Get regex validation for items with regex extensions * * @author Sean Fong */ export declare function getRegexValidation(qItem: QuestionnaireItem): RegexValidation | undefined; export declare function getRegexString(qItem: QuestionnaireItem): string | null; export declare function getMinValue(qItem: QuestionnaireItem): string | number | undefined; export declare function getMinValueFeedback(qItem: QuestionnaireItem): string | null; export declare function getMaxValue(qItem: QuestionnaireItem): string | number | undefined; export declare function getMaxValueFeedback(qItem: QuestionnaireItem): string | null; export declare function getRequiredFeedback(qItem: QuestionnaireItem): string | null; /** * Check if the item has a sdc-questionnaire-minQuantity and minQuantity extension * * @param {QuestionnaireItem} qItem - The QuestionnaireItem to check. * @returns {number | undefined} The numeric value of the minQuantity extension, if present. * * @author Janardhan Vignarajan */ export declare function getMinQuantityValue(qItem: QuestionnaireItem): number | undefined; /** * Check if the item has a sdc-questionnaire-minQuantity feedback extension * Probably should use targetConstraint instead of this, but we can't deprecate it yet * * @param {QuestionnaireItem} qItem - The QuestionnaireItem to check. * @returns {string | null} The value of the extension if found, otherwise null. * * @author Janardhan Vignarajan */ export declare function getMinQuantityValueFeedback(qItem: QuestionnaireItem): string | null; /** * Check if the item has a sdc-questionnaire-maxQuantity extension * * @param {QuestionnaireItem} qItem - The QuestionnaireItem to check. * @returns {number | undefined} The numeric value of the maxQuantity extension, if present. * * @author Janardhan Vignarajan */ export declare function getMaxQuantityValue(qItem: QuestionnaireItem): number | undefined; /** * Check if the item has a sdc-questionnaire-maxQuantity feedback extension * Probably should use targetConstraint instead of this, but we can't deprecate it yet * * @param {QuestionnaireItem} qItem - The QuestionnaireItem to check. * @returns {string | null} The value of the extension if found, otherwise null. * * @author Janardhan Vignarajan */ export declare function getMaxQuantityValueFeedback(qItem: QuestionnaireItem): string | null; /** * Check if the QuestionnaireItem has a 'item.text hidden' extension on the '_text' field. * * @param {QuestionnaireItem} qItem - The QuestionnaireItem to check. * @returns {boolean} True if the item text is hidden, otherwise false. */ export declare function isItemTextHidden(qItem: QuestionnaireItem): boolean; /** * Check if the QuestionnaireItem has a 'GroupHideAddItemButton' extension to hide the Add Item button for group tables. * * @param {QuestionnaireItem} qItem - The QuestionnaireItem to check. * @returns {boolean} True if the Add Item button should be hidden, otherwise false. */ export declare function isGroupAddItemButtonHidden(qItem: QuestionnaireItem): boolean; /** * Check if the item has a sdc-questionnaire-width extension * * @param {QuestionnaireItem} qItem - The QuestionnaireItem to check. * @returns {number | undefined} The numeric value of the columnWidth extension, if present. * * @author Janardhan Vignarajan */ export declare function getColumnWidth(qItem: QuestionnaireItem): string | undefined; /** * Check if the QuestionnaireItem has a 'showRepopulateButton' extension to show a sync button for granular repopulation. */ export declare function isItemRepopulatable(qItem: QuestionnaireItem): boolean;