Compare commits
2 Commits
3c64adc353
...
3bc54d7775
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3bc54d7775 | ||
|
|
1abdeca9de |
104777
dicom.log.1
104777
dicom.log.1
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@ import { QUERY_LEVEL } from '../dimse/querLevel';
|
|||||||
import { doWadoRs } from '../dimse/wadoRs';
|
import { doWadoRs } from '../dimse/wadoRs';
|
||||||
import { doWadoUri } from '../dimse/wadoUri';
|
import { doWadoUri } from '../dimse/wadoUri';
|
||||||
import { LoggerSingleton } from '../utils/logger';
|
import { LoggerSingleton } from '../utils/logger';
|
||||||
|
import moment from 'moment';
|
||||||
import deepmerge from 'deepmerge';
|
import deepmerge from 'deepmerge';
|
||||||
import combineMerge from '../utils/combineMerge';
|
import combineMerge from '../utils/combineMerge';
|
||||||
|
|
||||||
@@ -40,7 +40,15 @@ module.exports = function (server: FastifyInstance, opts: unknown, done: () => v
|
|||||||
Querystring: QueryParams;
|
Querystring: QueryParams;
|
||||||
}>('/rs/studies', async (req, reply) => {
|
}>('/rs/studies', async (req, reply) => {
|
||||||
try {
|
try {
|
||||||
const { query } = req;
|
var { query } = req;
|
||||||
|
|
||||||
|
// Jika req url tidak ada StudyInstanceUID maka tambahkan default StudyDate (yyyymmdd) kemarin dan hari ini
|
||||||
|
if (!query.StudyInstanceUID && !query.StudyDate) {
|
||||||
|
const startDate = moment().subtract(1, 'day').format('YYYYMMDD');
|
||||||
|
const endDate = moment().format('YYYYMMDD');
|
||||||
|
query.StudyDate = `${startDate}-${endDate}`;
|
||||||
|
}
|
||||||
|
|
||||||
const json = deepmerge.all(await doFind(QUERY_LEVEL.STUDY, query), options);
|
const json = deepmerge.all(await doFind(QUERY_LEVEL.STUDY, query), options);
|
||||||
return reply.send(json);
|
return reply.send(json);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user