fixing clients
This commit is contained in:
parent
c8ffe73057
commit
e031163932
|
@ -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';
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue