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2EAMAgD,EAAAA,GAAAA,CAAAA,EAAAA,CAAAA,CAAAA,0HASAC,EAAAA,GAAAA,CAAAA,EAAAA,CAAAA,CAAAA,kCAKAC,EAAAA,GAAAA,CAAAA,EAAAA,CAAAA,CAAAA","sources":["webpack://_N_E/./src/config/constants.ts","webpack://_N_E/./src/layers/presentation/context/GlobalStateContext.tsx","webpack://_N_E/./src/layers/presentation/i18n/client.ts","webpack://_N_E/./src/layers/presentation/services/patients.ts","webpack://_N_E/./src/layers/presentation/utils/fetchWrapper.ts","webpack://_N_E/./src/layers/support/monitoring/logger.ts","webpack://_N_E/./src/types/modelEnums.ts"],"sourcesContent":["export const CANCER_TYPE_PARAM_ID = 20;\nexport const CANCER_SUBTYPE_PARAM_ID = 21;\n","'use client';\n\nimport { fetchpatientParamsDictionary } from '@/layers/presentation/services/patients';\nimport logger from '@/layers/support/monitoring/logger';\nimport { UserType } from '@/types/modelEnums';\nimport {\n ProviderProfile,\n PatientParam,\n PatientParamValues,\n PatientProfile,\n SponsorProfile,\n User,\n ValidProfiles,\n} from '@/types/models';\nimport React, { createContext, ReactNode, useContext, useEffect, useState } from 'react';\n\nconst LOG_MODULE = 'FE [Presentation / Context / GlobalStateContext]';\n\ninterface GlobalStateContextType {\n patientParamsDictionary: PatientParam[];\n isLoadingParams: boolean;\n error: string | null;\n user: User | null;\n profile: ValidProfiles | null;\n selectedOptions: PatientParamValues;\n query: string;\n setUser: (user: User | null) => void;\n setProfile: (profile: ValidProfiles | null) => void;\n getProviderProfile: () => ProviderProfile | null;\n getPatientProfile: () => PatientProfile | null;\n getSponsorProfile: () => SponsorProfile | null;\n setSelectedOptions: React.Dispatch>;\n setQuery: (query: string) => void;\n}\n\nconst GlobalStateContext = createContext(undefined);\n\nexport const GlobalStateProvider: React.FC<{ children: ReactNode }> = ({ children }) => {\n const [patientParamsDictionary, setpatientParamsDictionary] = useState([]);\n const [isLoadingParams, setIsLoadingParams] = useState(true);\n const [error, setError] = useState(null);\n const [user, setUser] = useState(null);\n const [profile, setProfile] = useState(null);\n const [selectedOptions, setSelectedOptions] = useState({});\n const [query, setQuery] = useState('');\n\n const getProviderProfile = (): ProviderProfile | null => {\n return user?.type === UserType.PROVIDER ? (profile as ProviderProfile) : null;\n };\n\n const getPatientProfile = (): PatientProfile | null => {\n return user?.type === UserType.PATIENT ? (profile as PatientProfile) : null;\n };\n\n const getSponsorProfile = (): SponsorProfile | null => {\n return user?.type === UserType.SPONSOR ? (profile as SponsorProfile) : null;\n };\n\n logger.debug('Global state updated', {\n module: LOG_MODULE,\n data: {\n patientParamsDictionary,\n isLoadingParams,\n error,\n user,\n profile,\n },\n });\n\n useEffect(() => {\n const fetchParams = async () => {\n setIsLoadingParams(true);\n try {\n const { patientParamsDictionary } = await fetchpatientParamsDictionary();\n setpatientParamsDictionary(patientParamsDictionary);\n } catch (error) {\n setError((error as Error).message);\n } finally {\n setIsLoadingParams(false);\n }\n };\n\n fetchParams();\n }, []);\n\n return (\n \n {children}\n \n );\n};\n\nexport const useGlobalState = () => {\n const context = useContext(GlobalStateContext);\n if (context === undefined) {\n throw new Error('useGlobalState must be used within a GlobalStateProvider');\n }\n return context;\n};\n","'use client';\n\nimport { useTranslation as useReactI18nextTranslation } from 'react-i18next';\n\n/**\n * useTranslation hook provides the translation function and i18n instance.\n */\nexport const useTranslation = () => {\n const { t, i18n } = useReactI18nextTranslation();\n return { t, i18n };\n};\n","import logger from '@/layers/support/monitoring/logger';\nimport { FitStatus } from '@/types/modelEnums';\nimport {\n PatientExtended,\n PatientParam,\n PatientParamValues,\n PatientProfile,\n ProviderProfile,\n} from '@/types/models';\nimport {\n NewPatientByUserIdRequest,\n NewPatientRequest,\n PatientParamValuesExtended,\n} from '@/types/patients';\nimport { fetchWrapper } from '../utils/fetchWrapper';\nimport { CANCER_TYPE_PARAM_ID } from '@/config/constants';\n\nconst LOG_MODULE = 'FE [Presentation / Services / Patients]';\n\nconst API_URL = '/api/users/patients';\n\nexport const fetchPatients = async (filters: Record): Promise => {\n logger.debug(`${LOG_MODULE} fetchPatients: begin`, { filters });\n\n try {\n const result = await fetchWrapper.get(\n `${API_URL}?filters=${JSON.stringify(filters)}`,\n );\n\n logger.debug(`${LOG_MODULE} fetchPatients: end`, { result });\n return result;\n } catch (error) {\n logger.error(`${LOG_MODULE} fetchPatients`, { error });\n throw error;\n }\n};\n\nexport const fetchPatientById = async (id: string): Promise => {\n logger.debug(`${LOG_MODULE} fetchPatientById: begin`, { id });\n\n try {\n const result = await fetchWrapper.get(`${API_URL}/${id}`);\n\n logger.debug(`${LOG_MODULE} fetchPatientById: end`, { result });\n return result;\n } catch (error) {\n logger.error(`${LOG_MODULE} fetchPatientById`, { error });\n throw error;\n }\n};\n\nexport const fetchPatientByUserId = async (id: string): Promise => {\n logger.debug(`${LOG_MODULE} fetchPatientByUserId: begin`, { id });\n\n try {\n const result = await fetchWrapper.get(`${API_URL}/user/${id}`);\n\n logger.debug(`${LOG_MODULE} fetchPatientByUserId: end`, { result });\n return result;\n } catch (error) {\n logger.error(`${LOG_MODULE} fetchPatientByUserId`, { error });\n throw error;\n }\n};\n\nexport const createPatient = async (patient: NewPatientRequest): Promise => {\n logger.debug(`${LOG_MODULE} createPatient: begin`, { patient });\n\n try {\n const result = await fetchWrapper.post(API_URL, patient);\n\n logger.debug(`${LOG_MODULE} createPatient: end`, { result });\n return result;\n } catch (error) {\n logger.error(`${LOG_MODULE} createPatient`, { error });\n throw error;\n }\n};\n\nexport const createPatientByUserId = async (\n patient: NewPatientByUserIdRequest,\n): Promise => {\n logger.debug(`${LOG_MODULE} createPatientByUserId: begin`, { patient });\n\n try {\n const result = await fetchWrapper.post(\n `${API_URL}/user/${patient.user_id}`,\n patient,\n );\n\n logger.debug(`${LOG_MODULE} createPatientByUserId: end`, { result });\n return result;\n } catch (error) {\n logger.error(`${LOG_MODULE} createPatientByUserId`, { error });\n throw error;\n }\n};\n\nexport const updatePatient = async (\n id: string,\n patient: Partial,\n): Promise => {\n logger.debug(`${LOG_MODULE} updatePatient: begin`, { id, patient });\n\n try {\n const result = await fetchWrapper.put(`${API_URL}/${id}`, patient);\n\n logger.debug(`${LOG_MODULE} updatePatient: end`, { result });\n return result;\n } catch (error) {\n logger.error(`${LOG_MODULE} updatePatient`, { error });\n throw error;\n }\n};\n\nexport const deletePatient = async (id: string): Promise => {\n logger.debug(`${LOG_MODULE} deletePatient: begin`, { id });\n\n try {\n const result = await fetchWrapper.delete(`${API_URL}/${id}`);\n\n logger.debug(`${LOG_MODULE} deletePatient: end`, { result });\n return result;\n } catch (error) {\n logger.error(`${LOG_MODULE} deletePatient`, { error });\n throw error;\n }\n};\n\nexport const fetchpatientParamsDictionary = async (): Promise<{\n patientParamsDictionary: PatientParam[];\n}> => {\n logger.debug(`${LOG_MODULE} fetchpatientParamsDictionary: begin`);\n\n try {\n const result = await fetchWrapper.get<{ patientParamsDictionary: PatientParam[] }>(\n `${API_URL}/params`,\n );\n\n logger.debug(`${LOG_MODULE} fetchpatientParamsDictionary: end`);\n return result;\n } catch (error) {\n logger.error(`${LOG_MODULE} fetchpatientParamsDictionary`, { error });\n throw error;\n }\n};\n\nexport const getPatientParamBySlug = (params: PatientParam[], slug: string): PatientParam => {\n logger.debug(`${LOG_MODULE} getPatientParamBySlug: begin`, { params, slug });\n\n try {\n const result = params.find(param => param.slug === slug) as PatientParam;\n\n logger.debug(`${LOG_MODULE} getPatientParamBySlug: end`, { result });\n return result;\n } catch (error) {\n logger.error(`${LOG_MODULE} getPatientParamBySlug`, { error });\n throw error;\n }\n};\n\nexport const getPatientParamValuesExtended = (\n patientParamsDictionary: PatientParam[],\n selectedOptions: PatientParamValues,\n): PatientParamValuesExtended => {\n logger.debug(`${LOG_MODULE} getPatientParamValuesExtended: begin`, {\n selectedOptions,\n });\n\n const result: PatientParamValuesExtended = {};\n\n try {\n selectedOptions &&\n Object.keys(selectedOptions).forEach(paramId => {\n const param = patientParamsDictionary.find(p => Number(p.id) === Number(paramId));\n if (param && Array.isArray(selectedOptions[paramId])) {\n const values = selectedOptions[paramId].map(optionId => {\n const option = param.options.find(o => Number(o.id) === Number(optionId));\n return {\n value: optionId,\n label: option ? option.option : '',\n };\n });\n\n result[param.id] = {\n param,\n values,\n };\n }\n });\n\n logger.debug(`${LOG_MODULE} getPatientParamValuesExtended: end`, { result });\n return result;\n } catch (error) {\n logger.error(`${LOG_MODULE} getPatientParamValuesExtended`, { error });\n throw error;\n }\n};\n\nexport const updatePatientParamValues = async (\n id: string,\n params: PatientParamValues,\n): Promise => {\n logger.debug(`${LOG_MODULE} updatePatientParamValues: begin`, { id, params });\n\n try {\n const result = await fetchWrapper.put(`${API_URL}/${id}/params`, params);\n\n logger.debug(`${LOG_MODULE} updatePatientParamValues: end`, { result });\n return result;\n } catch (error) {\n logger.error(`${LOG_MODULE} updatePatientParamValues`, { error });\n throw error;\n }\n};\n\ntype Params = PatientParamValues;\n\nexport function doesPatientFitProgram(patientParams: Params, programParams: Params): FitStatus {\n logger.debug(`${LOG_MODULE} doesPatientFitProgram: begin`, {\n patientParams,\n programParams,\n });\n\n const cancerTypeIdStr = CANCER_TYPE_PARAM_ID.toString();\n const programCancerTypes = programParams[cancerTypeIdStr] || [];\n const patientCancerTypes = patientParams[cancerTypeIdStr] || [];\n\n logger.debug(`${LOG_MODULE} doesPatientFitProgram: Checking cancer types`, {\n cancerTypeId: cancerTypeIdStr,\n programCancerTypes,\n patientCancerTypes,\n });\n\n if (\n !Array.isArray(programCancerTypes) ||\n programCancerTypes.length === 0 ||\n !Array.isArray(patientCancerTypes) ||\n patientCancerTypes.length === 0\n ) {\n logger.debug(\n `${LOG_MODULE} doesPatientFitProgram: No cancer types specified or invalid format`,\n {\n programCancerTypes,\n patientCancerTypes,\n },\n );\n return FitStatus.NOT_FIT;\n }\n\n const hasMatchingCancerType = programCancerTypes.some(programOption =>\n patientCancerTypes.includes(programOption),\n );\n\n const fitStatus = hasMatchingCancerType ? FitStatus.FULLY_FIT : FitStatus.NOT_FIT;\n\n logger.debug(`${LOG_MODULE} doesPatientFitProgram: end`, {\n hasMatchingCancerType,\n fitStatus,\n });\n\n return fitStatus;\n}\n","import logger from '@/layers/support/monitoring/logger';\nimport { handleError } from './errorHandler';\n\nconst LOG_MODULE = 'FE [Presentation / Utils / fetchWrapper]';\n\nexport const fetchWrapper = {\n get: async (url: string): Promise => {\n logger.debug(`${LOG_MODULE} get: begin`, { url });\n\n try {\n const response = await fetch(url);\n if (!response.ok) {\n throw new Error('Failed to fetch data');\n }\n const data = await response.json(); // Await the JSON response\n\n logger.debug(`${LOG_MODULE} get: end`, { data });\n return data;\n } catch (error) {\n logger.error(`${LOG_MODULE} get`, { error });\n throw error;\n }\n },\n\n post: async (url: string, body: any): Promise => {\n logger.debug(`${LOG_MODULE} post: begin`, { url, body });\n\n try {\n const response = await fetch(url, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(body),\n });\n if (!response.ok) {\n throw new Error('Failed to post data');\n }\n const data = await response.json();\n\n logger.debug(`${LOG_MODULE} post: end`, { data });\n return data;\n } catch (error) {\n logger.error(`${LOG_MODULE} post`, { error });\n throw error;\n }\n },\n\n put: async (url: string, body: any): Promise => {\n logger.debug(`${LOG_MODULE} put: begin`, { url, body });\n\n try {\n const response = await fetch(url, {\n method: 'PUT',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(body),\n });\n if (!response.ok) {\n throw new Error('Failed to update data');\n }\n const data = await response.json();\n\n logger.debug(`${LOG_MODULE} put: end`, { data });\n return data;\n } catch (error) {\n logger.error(`${LOG_MODULE} put`, { error });\n throw error;\n }\n },\n\n delete: async (url: string): Promise => {\n logger.debug(`${LOG_MODULE} delete: begin`, { url });\n\n try {\n const response = await fetch(url, { method: 'DELETE' });\n if (!response.ok) {\n throw new Error('Failed to delete data');\n }\n const data = await response.json();\n\n logger.debug(`${LOG_MODULE} delete: end`, { data });\n return data;\n } catch (error) {\n logger.error(`${LOG_MODULE} delete`, { error });\n throw error;\n }\n },\n};\n","import log from 'loglevel';\n\n// Set default level to INFO\nconst defaultLevel = log.levels.INFO;\n\n// Get log level from environment variable - check both backend and frontend env vars\nconst envLogLevel = (process.env.LOG_LEVEL || process.env.NEXT_PUBLIC_LOG_LEVEL)?.toLowerCase();\n\n// Use environment variable if valid, otherwise use default\nconst validLevels = ['trace', 'debug', 'info', 'warn', 'error', 'silent'] as const;\ntype LogLevel = (typeof validLevels)[number];\n\nconst logLevel =\n envLogLevel && validLevels.includes(envLogLevel as LogLevel)\n ? (envLogLevel as log.LogLevelDesc)\n : defaultLevel;\n\nlog.setLevel(logLevel);\n\n// Check if we're running in a browser environment\nconst isBrowser = typeof window !== 'undefined';\n\ninterface LogEntry {\n timestamp: string;\n message: string;\n module?: string;\n data?: any;\n}\n\n// Helper function to create structured log object\nconst createStructuredLog = (message: string, args: any[]): string | [LogEntry] => {\n const timestamp = new Date().toISOString();\n\n // For browser console, return objects directly\n if (isBrowser) {\n // If using new format (message + {module, data})\n if (args.length === 1 && typeof args[0] === 'object' && 'module' in args[0]) {\n const { module, data } = args[0];\n return [\n {\n timestamp,\n message,\n module,\n data,\n },\n ];\n }\n\n // For old format or other cases\n return [\n {\n timestamp,\n message,\n data: args.length === 1 ? args[0] : args.length > 1 ? args : undefined,\n },\n ];\n }\n\n // For server-side/CloudWatch, return JSON string\n const logObject =\n args.length === 1 && typeof args[0] === 'object' && 'module' in args[0]\n ? {\n timestamp,\n message,\n module: args[0].module,\n data: args[0].data,\n }\n : {\n timestamp,\n message,\n data: args.length === 1 ? args[0] : args.length > 1 ? args : undefined,\n };\n\n return JSON.stringify(logObject);\n};\n\n// Custom log methods that preserve object formatting in browser console\nconst logger = {\n info: (message: string, ...args: any[]) => {\n const logData = createStructuredLog(message, args);\n isBrowser ? log.info(...(logData as [LogEntry])) : log.info(logData);\n },\n warn: (message: string, ...args: any[]) => {\n const logData = createStructuredLog(message, args);\n isBrowser ? log.warn(...(logData as [LogEntry])) : log.warn(logData);\n },\n error: (message: string, ...args: any[]) => {\n const logData = createStructuredLog(message, args);\n isBrowser ? log.error(...(logData as [LogEntry])) : log.error(logData);\n },\n debug: (message: string, ...args: any[]) => {\n const logData = createStructuredLog(message, args);\n isBrowser ? log.debug(...(logData as [LogEntry])) : log.debug(logData);\n },\n setLevel: (level: log.LogLevelDesc) => log.setLevel(level),\n};\n\nexport default logger;\n","// Define enums for user types\nexport enum UserType {\n PATIENT = 'Patient',\n PROVIDER = 'Provider',\n SPONSOR = 'Sponsor',\n PLATFORM_OWNER = 'PlatformOwner',\n ADMIN = 'Admin',\n}\n\nexport enum ProgramStatus {\n DRAFT = 'Draft',\n ACTIVE = 'Active',\n INACTIVE = 'Inactive',\n ARCHIVED = 'Archived',\n}\n\nexport enum ProgramStatusColor {\n Draft = 'warning',\n Active = 'success',\n Inactive = 'default',\n Archived = 'default',\n}\n\n// Define enums for param types and levels\nexport enum ParamType {\n Text = 'Text',\n Number = 'Number',\n Date = 'Date',\n Location = 'Location',\n Boolean = 'Boolean',\n Select = 'Select',\n}\n\nexport enum ParamLevel {\n Mandatory = 'Mandatory',\n Basic = 'Basic',\n Additional = 'Additional',\n Advanced = 'Advanced',\n}\n\nexport enum FormType {\n ProgramRequest = 'ProgramRequest',\n ICF = 'ICF',\n Patient = 'Patient',\n Provider = 'Provider',\n}\n\nexport enum UserGender {\n Male = 'Male',\n Female = 'Female',\n Other = 'Other',\n}\n\nexport enum ProviderVerificationStatus {\n NonVerified = 'Non-verified',\n Pending = 'Pending',\n Verified = 'Verified',\n Rejected = 'Rejected',\n}\n\nexport enum NotificationType {\n Info = 'info',\n Warning = 'warning',\n Error = 'error',\n Success = 'success',\n}\n\n// Define FitStatus enum\nexport enum FitStatus {\n FULLY_FIT = 'fullyFit',\n PARTIALLY_FIT = 'partiallyFit',\n NOT_FIT = 'notFit',\n}\n\nexport enum ProgramRequestStatus {\n None = 'Not sent',\n Sent = 'Sent',\n Pending = 'Pending',\n Approved = 'Approved',\n Declined = 'Declined',\n Withdrawn = 'Withdrawn',\n}\n\nexport enum ProgramRequestType {\n Simple = 'Simple',\n Full = 'Full',\n}\n\nexport enum ProgramRequestStatusColor {\n Pending = 'warning',\n Approved = 'success',\n Declined = 'danger',\n Withdrawn = 'default',\n}\n"],"names":["CANCER_TYPE_PARAM_ID","CANCER_SUBTYPE_PARAM_ID","GlobalStateContext","createContext","undefined","GlobalStateProvider","children","param","patientParamsDictionary","setpatientParamsDictionary","useState","isLoadingParams","setIsLoadingParams","error","setError","user","setUser","profile","setProfile","selectedOptions","setSelectedOptions","query","setQuery","logger","debug","module","data","useEffect","fetchParams","fetchpatientParamsDictionary","message","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","jsx","Provider","value","getProviderProfile","type","UserType","PROVIDER","getPatientProfile","PATIENT","getSponsorProfile","SPONSOR","useGlobalState","context","useContext","useTranslation","t","i18n","useReactI18nextTranslation","LOG_MODULE","API_URL","fetchPatients","filters","concat","result","fetchWrapper","get","JSON","stringify","fetchPatientById","id","fetchPatientByUserId","createPatient","patient","post","createPatientByUserId","user_id","updatePatient","put","getPatientParamBySlug","params","slug","find","getPatientParamValuesExtended","Object","keys","forEach","paramId","p","Number","Array","isArray","values","map","optionId","option","options","o","label","updatePatientParamValues","doesPatientFitProgram","patientParams","programParams","cancerTypeIdStr","toString","programCancerTypes","patientCancerTypes","cancerTypeId","length","FitStatus","NOT_FIT","hasMatchingCancerType","some","programOption","includes","fitStatus","FULLY_FIT","url","response","fetch","ok","json","body","method","headers","delete","process","defaultLevel","log","INFO","envLogLevel","env","LOG_LEVEL","_this","toLowerCase","logLevel","validLevels","createStructuredLog","args","timestamp","Date","toISOString","__webpack_exports__","Z","info","logData","warn","setLevel","level","ProgramStatus","ProgramStatusColor","ParamType","ParamLevel","FormType","UserGender","ProviderVerificationStatus","NotificationType","ProgramRequestStatus","ProgramRequestType","ProgramRequestStatusColor"],"sourceRoot":""}