Type '(legacyData: HospitDataType) => { id: number; title: string; isInclusive: true; occurrence: { value: number; comparator: Comparators; }; encounterService: Hierarchy<ScopeElement, string>[] | null; ... 5 more ...; code: any; }' is not assignable to type '(legacyData: HospitDataType, criteriaData: CriteriaItemDataCache) => CriteriaData<NewHospitDataType>'.