import type { Questionnaire, QuestionnaireItem, QuestionnaireResponseItem } from 'fhir/r4'; /** * Generate an array of QuestionnaireResponseItems corresponding to its QuestionnaireItem indexes an array. * QuestionnaireItems without a corresponding QuestionnaireResponseItem is set as undefined. * i.e. QItems = [QItem0, QItem1, QItem2]. Only QItem0 and QItem2 have QrItems * Generated array: [QrItem0, undefined, QrItem2] * Note: There's a bug where if the qItems are child items from a repeat group, the function fails at the isRepeatGroup line. * Ensure that repeat groups are handled prior to calling this function. * * @author Sean Fong */ export declare function getQrItemsIndex(qItems: QuestionnaireItem[], qrItems: QuestionnaireResponseItem[] | undefined, qItemsIndexMap: Record): (QuestionnaireResponseItem | QuestionnaireResponseItem[] | undefined)[]; /** * Generate a dictionary of QuestionnaireItems linkIds mapped to their respective array indexes `` * i.e. `{ ee2589d5: 0, f9aaa187: 1, 88cab112: 2 }` * where ee2589d5, f9aaa187 and 88cab112 are linkIds of QItem0, QItem1 and QItem2 respectively * * @author Sean Fong */ export declare function mapQItemsIndex(questionnaireOrQItem: QuestionnaireItem | Questionnaire): Record;