fixing clients

This commit is contained in:
Jason Kulatunga 2022-10-06 17:54:40 -07:00
parent c8ffe73057
commit e031163932
6 changed files with 7 additions and 6 deletions

View File

@ -1,4 +1,4 @@
import {SourceType} from '../models/database/types';
import {SourceType} from '../models/database/source_types';
import {Source} from '../models/database/source';
import {IClient} from './interface';
import {AetnaClient} from './fhir/aetna_client';

View File

@ -8,10 +8,11 @@ export abstract class BaseClient {
private oauthClient: Oauth.Client
private oauthAuthorizationServer: Oauth.AuthorizationServer
public source: Source
public headers: Headers = new Headers()
public headers: Headers
protected constructor(source: Source) {
this.source = source
this.headers = new Headers()
//init Oauth client based on source configuration
this.oauthClient = {

View File

@ -6,7 +6,7 @@ export class CareEvolutionClient extends FHIR401Client implements IClient {
constructor(source: Source) {
super(source);
//CareEvolution API requires the following Accept header for every request
this.headers["Accept"] = "application/json+fhir"
this.headers.set("Accept","application/json+fhir")
}
}

View File

@ -7,7 +7,7 @@ export class CernerClient extends FHIR401Client implements IClient {
constructor(source: Source) {
super(source);
//Cerner API requires the following Accept header for every request
this.headers["Accept"] = "application/json+fhir"
this.headers.set("Accept","application/json+fhir")
}
/**

View File

@ -7,7 +7,7 @@ export class EpicClient extends FHIR401Client implements IClient {
constructor(source: Source) {
super(source);
//Epic API requires the following Accept header for every request
this.headers["Accept"] = "application/json+fhir"
this.headers.set("Accept","application/json+fhir")
}
/**

View File

@ -7,7 +7,7 @@ export class HealthITClient extends FHIR401Client implements IClient {
constructor(source: Source) {
super(source);
//HealthIT API requires the following Accept header for every request
this.headers["Accept"] = "application/json+fhir"
this.headers.set("Accept","application/json+fhir")
}
/**