-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iSantePlus setup for custom modules and LNSP mock (#86)
* Updating iSantePlus setup for custom modules and mysql extraction * network fix * LNSP Mock and server fixes * Mock work * Retry work * module update * Agenda work * Format and lint * Finished LNSP mock work
- Loading branch information
Showing
55 changed files
with
9,134 additions
and
601 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-3.78 MB
packages/emr-isanteplus/config/custom_modules/xds-sender-2.4.0-SNAPSHOT.omod
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,5 @@ networks: | |
reverse-proxy: | ||
name: reverse-proxy_public | ||
external: true | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
packages/reverse-proxy-nginx/package-conf-insecure/http-isanteplus-insecure.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# OpenHIM Core HTTP server config | ||
server { | ||
listen 8091; | ||
client_max_body_size 10M; | ||
|
||
location / { | ||
resolver 127.0.0.11 valid=30s; | ||
set $upstream_isanteplus isanteplus; | ||
proxy_pass http://$upstream_isanteplus:8080; | ||
} | ||
} |
9 changes: 0 additions & 9 deletions
9
packages/reverse-proxy-nginx/package-conf-insecure/http-jsreport-insecure.conf
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
packages/reverse-proxy-nginx/package-conf-insecure/http-kibana-insecure.conf
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
packages/reverse-proxy-nginx/package-conf-insecure/http-minio-insecure.conf
This file was deleted.
Oops, something went wrong.
31 changes: 0 additions & 31 deletions
31
packages/reverse-proxy-nginx/package-conf-secure/http-monitoring-secure.conf
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
DB_HOST=localhost | ||
DB_PORT=27019 | ||
DB_NAME=nest | ||
DB_NAME=nest | ||
RETRY_INTERVAL=30 | ||
MAX_RETRIES=7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import { Module, Global, Inject, OnModuleDestroy } from '@nestjs/common'; | ||
import { ConfigService } from '@nestjs/config'; | ||
import Agenda from 'agenda'; | ||
import { Logger } from '@nestjs/common'; | ||
|
||
const logger = new Logger('Agenda'); | ||
|
||
@Global() | ||
@Module({ | ||
providers: [ | ||
{ | ||
provide: 'AGENDA_INSTANCE', | ||
useFactory: async (configService: ConfigService) => { | ||
const host = configService.get<string>('DB_HOST'); | ||
const port = configService.get<number>('DB_PORT'); | ||
const name = configService.get<string>('DB_NAME'); | ||
|
||
const uri = `mongodb://${host}:${port}/${name}`; | ||
logger.log(`Agenda connecting to MongoDB at ${uri}`); | ||
|
||
const agenda = new Agenda({ | ||
db: { address: uri, collection: 'agendaJobs' }, | ||
}); | ||
|
||
// Set up event logging here | ||
agenda.on('start', (job) => { | ||
console.log( | ||
`Job ${job.attrs.name} started at ${new Date( | ||
job.attrs.lastRunAt, | ||
).toISOString()}`, | ||
); | ||
}); | ||
|
||
agenda.on('complete', (job) => { | ||
console.log( | ||
`Job ${job.attrs.name} completed at ${new Date( | ||
job.attrs.lastFinishedAt, | ||
).toISOString()}`, | ||
); | ||
}); | ||
|
||
agenda.on('fail', (error, job) => { | ||
console.error( | ||
`Job ${job.attrs.name} failed with error: ${error.message}`, | ||
); | ||
}); | ||
logger.log('Starting Agenda'); | ||
await agenda.start(); | ||
logger.log('Agenda started'); | ||
|
||
return agenda; | ||
}, | ||
inject: [ConfigService], | ||
}, | ||
], | ||
exports: ['AGENDA_INSTANCE'], | ||
}) | ||
export class AgendaModule implements OnModuleDestroy { | ||
constructor(@Inject('AGENDA_INSTANCE') private readonly agenda: Agenda) {} | ||
|
||
async onModuleDestroy() { | ||
await this.agenda.stop(); // Gracefully stop Agenda | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ import { LabOrderDAO } from './lab-order.dao'; | |
import { NotificationService } from '../notification/notification.service'; | ||
import { Hl7Service } from 'src/core/hl7/hl7.service'; | ||
|
||
/* | ||
const example_message = `------=_Part_59239_818160219.1723569579332 | ||
Content-Type: application/xop+xml; charset=utf-8; type="application/soap+xml" | ||
|
@@ -50,6 +51,7 @@ ORC|NW|11221685923|||||^^^20240813131934||20240813131934|||11221^Demo^Provider|| | |
OBR||11221685923||VLCVR|||20240813131934||||O|||||11221^Demo^Provider|||||||||||^^^20240813131934 | ||
------=_Part_59239_818160219.1723569579332--`; | ||
*/ | ||
|
||
const documentSubmissionSuccessTemplate = `------=_Part_60435_1628391534.1724167510003 | ||
Content-Type: application/xop+xml; charset=utf-8; type="application/soap+xml" | ||
|
@@ -215,7 +217,8 @@ export class LabOrderService { | |
let responseBody; | ||
let status; | ||
|
||
const contentType = 'multipart/related;boundary="----=_Part_59239_818160219.1723569579332"; type="application/xop+xml"; start-info="application/soap+xml";charset=UTF-8' | ||
const contentType = | ||
'multipart/related;boundary="----=_Part_59239_818160219.1723569579332"; type="application/xop+xml"; start-info="application/soap+xml";charset=UTF-8'; | ||
//const contentType = 'multipart/related;start="<rootpart*[email protected]>";type="application/xop+xml";boundary="uuid:59239_818160219.1723569579332";start-info="application/soap+xml;action="urn:ihe:iti:2007:RetrieveDocumentSet""'; | ||
|
||
if (result && result.length === 1) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.