Summary Table

Categories Total Count
PII 0
URL 0
DNS 0
EKL 0
IP 0
PORT 0
VsID 0
CF 0
AI 0
VPD 0
PL 0
Other 0

File Content

const express = require('express');
const router = express.Router();
const rest = require('../../rest/rest');

router.post('/submit', (req, res) => {
rest
.postResource(
process.env.END_POINT_BASE_URI + process.env.ADDITIONAL_INFO,
req.body
)
.then(data => {
res.status(data.response.statusCode).json(data.responseBody);
})
.catch(error => {
console.log('submit rfai', error);
res.status(500).json(error);
// res.status(data.response.statusCode).json(error)
});
});

router.post('/updateRfai', (req, res) => {
rest
.postResource(
process.env.END_POINT_BASE_URI + process.env.UPDATE_RFAI,
req.body
)
.then(data => {
res.status(data.response.statusCode).json(data.responseBody);
})
.catch(error => console.log('Update rfai', error));
});

router.get('/populateClaim/:id', (req, res) => {
const id = req.params.id;
rest
.getResource(
process.env.END_POINT_BASE_URI +
process.env.POPULATE_CLAIM +
'/' +
id +
'?level=line'
)
.then(data => {
res.status(data.response.statusCode).json(data.responseBody);
})
.catch(error => {
console.log('Reports populateClaim error ', error);
});
});

router.get('/viewSubmit/:id', (req, res) => {
const id = req.params.id;
rest
.getResource(
process.env.END_POINT_BASE_URI + process.env.SUBMISSION_INFO + '/' + id
)
.then(data => {
res.status(data.response.statusCode).json(data.responseBody);
})
.catch(error => {
console.log('Reports viewSubmit error ', error);
});
});

router.post('/getHccs', (req, res) => {
rest
.postResource(
process.env.END_POINT_BASE_URI + process.env.GET_HCCSCODE,
req.body
)
.then(data => {
res.status(data.response.statusCode).json(data.responseBody);
})
.catch(error => {
console.log('Reports getHccS error ', error);
});
});

router.get('/getPayers', (req, res) => {
rest
.getResource(process.env.END_POINT_BASE_URI + process.env.GET_PAYERS)
.then(data => {
res.status(data.response.statusCode).json(data.responseBody);
})
.catch(error => {
console.log('Reports getPayers error ', error);
});
});

router.post('/getLoincCodes', (req, res) => {
rest
.postResource(
process.env.END_POINT_BASE_URI + process.env.GET_LOINCCODES,
req.body
)
.then(data => {
res.status(data.response.statusCode).json(data.responseBody);
})
.catch(error => {
console.log('Reports getLoincCodes error ', error);
});
});

router.post('/getLoincCodeModifiers', (req, res) => {
rest
.postResource(
process.env.END_POINT_BASE_URI + process.env.GET_LOINCODEMODIFIERS,
req.body
)
.then(data => {
res.status(data.response.statusCode).json(data.responseBody);
})
.catch(error => {
console.log('Reports getLoincCodeModifiers error ', error);
});
});

router.get('/checkPending/:id', (req, res) => {
const id = req.params.id;
rest
.getResource(
process.env.END_POINT_BASE_URI + process.env.CHECK_PENDING + '/' + id
)
.then(data => {
res.status(data.response.statusCode).json(data.responseBody);
})
.catch(error => {
console.log('Reports checkPending error ', error);
});
});

module.exports = router;