Skip to content

Commit

Permalink
Debug setup fixes (#58)
Browse files Browse the repository at this point in the history
* Debug setup fixes

* Fixed issue with line endings in HL7 templates

* Test fix
  • Loading branch information
pmanko authored Aug 31, 2022
1 parent 88049f2 commit aeda36c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
6 changes: 3 additions & 3 deletions config/config_docker.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
"toIpmsOrmTemplate": "ORM_O01_TO_IPMS.hbs",
"fromIpmsOruTemplate": "ORU_R01_FROM_IPMS.hbs",
"mllp": {
"targetIp": "127.0.0.1",
"targetAdtPort": 1234,
"targetOrmPort": 1234
"targetIp": "localhost",
"targetAdtPort": 2100,
"targetOrmPort": 2100
}
}
}
10 changes: 7 additions & 3 deletions debug.docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,22 @@ services:
hostname: shr
build:
context: ./
args:
args:
- NODE_AUTH_TOKEN
- NODE_ENV=docker
ports:
- 3000:3000
- 4000:3000
- 3001:3001
- 3002:3002
- '9229:9229'
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
- NODE_ENV=docker
volumes:
- ./config/config_docker.json:/app/config/config_docker.json
# - ./config/mediator_ci.json:/app/config/mediator_docker.json
entrypoint: node --inspect=0.0.0.0:9229 ./dist/app.js
entrypoint: node --inspect=0.0.0.0:9229 /app/dist/app.js
# tty: true
# stdin_open: true
# entrypoint: bash
Expand Down
2 changes: 1 addition & 1 deletion src/workflows/__tests__/labWorkflowsBw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('lab Workflows for Botswana should', () => {

beforeAll((done: () => void) => {
jest.setTimeout(1000000)
server = new MllpServer('127.0.0.1', 1234)
server = new MllpServer('127.0.0.1', 2100)
server.listen()

hl7 = fs.readFileSync('./src/__data__/sample_ADT.txt').toString().split('\n').join('\r')
Expand Down
4 changes: 3 additions & 1 deletion src/workflows/labWorkflowsBw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ export class LabWorkflowsBw extends LabWorkflows {

let crResult = await got.post(`${crUrl}`, options).json()

logger.info(`CR Patient Update Result: ${crResult}`)
logger.info(`CR Patient Update Result: ${JSON.stringify(crResult)}`)

return bundle
}
Expand Down Expand Up @@ -308,6 +308,8 @@ export class LabWorkflowsBw extends LabWorkflows {

logger.info(`adt:\n${adtMessage}`)

adtMessage = adtMessage.replace(/[\n\r]/g, '\r');

let adtResult: String = <String>await sender.send(adtMessage)

if (adtResult.includes('AA')) {
Expand Down

0 comments on commit aeda36c

Please sign in to comment.