@eka-care/ekascribe-ts-sdk 1.5.51 → 1.5.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,8 +9,8 @@ export type TSearchSessionsRequest = {
|
|
|
9
9
|
};
|
|
10
10
|
export type TSearchSessionsByPatientRequest = {
|
|
11
11
|
sessions: TSessionHistoryData[];
|
|
12
|
-
patientName
|
|
13
|
-
sessionId
|
|
12
|
+
patientName?: string;
|
|
13
|
+
sessionId?: string;
|
|
14
14
|
};
|
|
15
15
|
declare const searchSessions: ({ sessions, searchCriteria, }: TSearchSessionsRequest) => Promise<TSessionHistoryData[]>;
|
|
16
16
|
declare const searchSessionsByPatient: ({ sessions, patientName, }: TSearchSessionsByPatientRequest) => Promise<TSessionHistoryData[]>;
|
|
@@ -34,16 +34,13 @@ const searchBySessionId = (sessions, sessionId) => {
|
|
|
34
34
|
// Combined search function that applies multiple criteria
|
|
35
35
|
const performSearch = (sessions, searchCriteria) => {
|
|
36
36
|
let filteredSessions = sessions;
|
|
37
|
-
console.log(sessions, searchCriteria, 'searchCriteria');
|
|
38
37
|
// Apply patient name filter if provided
|
|
39
38
|
if (searchCriteria.patientName) {
|
|
40
39
|
filteredSessions = searchByPatientName(filteredSessions, searchCriteria.patientName);
|
|
41
|
-
console.log(filteredSessions, 'filteredSessions - patientName');
|
|
42
40
|
}
|
|
43
41
|
// Apply session ID filter if provided
|
|
44
42
|
if (searchCriteria.sessionId) {
|
|
45
43
|
filteredSessions = searchBySessionId(filteredSessions, searchCriteria.sessionId);
|
|
46
|
-
console.log(filteredSessions, 'filteredSessions - sessionId');
|
|
47
44
|
}
|
|
48
45
|
// If no search criteria provided, return all sessions
|
|
49
46
|
if (!searchCriteria.patientName && !searchCriteria.sessionId) {
|