Working nextgen api.
Adding platform_type key for use in filters. fixing docker-compose file referencing couchdb.
This commit is contained in:
parent
7a730ec32b
commit
f2d3edbc90
|
@ -47,11 +47,10 @@ make backend-test
|
||||||
|
|
||||||
# Start Development Environment
|
# Start Development Environment
|
||||||
|
|
||||||
To run Fasten from source, you'll need to create 3 separate processes:
|
To run Fasten from source, you'll need to create 2 separate processes:
|
||||||
|
|
||||||
- Angular Frontend
|
- Angular Frontend
|
||||||
- Go Backend
|
- Go Backend
|
||||||
- CouchDB Database
|
|
||||||
|
|
||||||
First we'll create a development config file (`config.dev.yaml`)
|
First we'll create a development config file (`config.dev.yaml`)
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
version: "3.9"
|
version: "3.9"
|
||||||
services:
|
services:
|
||||||
couchdb:
|
fasten:
|
||||||
|
# NOTE: only developers need to build Fasten from source
|
||||||
|
# For production, use the pre-built image from GitHub Packages
|
||||||
|
# ghcr.io/fastenhealth/fasten-onprem:main
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
# environment:
|
args:
|
||||||
# - COUCHDB_USER=admin
|
- FASTEN_ENV=prod
|
||||||
# - COUCHDB_PASSWORD=password
|
# - FASTEN_ENV=sandbox
|
||||||
ports:
|
ports:
|
||||||
- "9090:8080"
|
- "9090:8080"
|
||||||
- "5984:5984"
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./.couchdb/data:/opt/couchdb/data
|
- ./db:/opt/fasten/db
|
||||||
- ./.couchdb/config:/opt/couchdb/etc/local.d
|
|
||||||
# - ./config.example.yaml:/opt/fasten/config/config.yaml
|
# - ./config.example.yaml:/opt/fasten/config/config.yaml
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
export class MetadataSource {
|
export class MetadataSource {
|
||||||
|
platform_type: string
|
||||||
source_type: string
|
source_type: string
|
||||||
display: string
|
display: string
|
||||||
category: string[]
|
category: string[]
|
||||||
|
|
|
@ -43,6 +43,7 @@ export class DashboardComponent implements OnInit {
|
||||||
this.metadataSource = metadataSource
|
this.metadataSource = metadataSource
|
||||||
this.metadataSource["manual"] = {
|
this.metadataSource["manual"] = {
|
||||||
"source_type": "manual",
|
"source_type": "manual",
|
||||||
|
"platform_type": "manual",
|
||||||
"display": "Manual",
|
"display": "Manual",
|
||||||
"category": ["Manual"],
|
"category": ["Manual"],
|
||||||
"hidden": false,
|
"hidden": false,
|
||||||
|
|
|
@ -218,7 +218,14 @@ export class MedicalSourcesComponent implements OnInit {
|
||||||
console.log("NO PATIENT ID present, decoding jwt to extract patient")
|
console.log("NO PATIENT ID present, decoding jwt to extract patient")
|
||||||
//const introspectionResp = await Oauth.introspectionRequest(as, client, payload.access_token)
|
//const introspectionResp = await Oauth.introspectionRequest(as, client, payload.access_token)
|
||||||
//console.log(introspectionResp)
|
//console.log(introspectionResp)
|
||||||
payload.patient = this.jwtDecode(payload.id_token)["profile"].replace(/^(Patient\/)/,'')
|
let decodedIdToken = this.jwtDecode(payload.id_token)
|
||||||
|
//nextGen uses fhirUser instead of profile.
|
||||||
|
payload.patient = decodedIdToken["profile"] || decodedIdToken["fhirUser"]
|
||||||
|
|
||||||
|
if(payload.patient){
|
||||||
|
payload.patient = payload.patient.replace(/^(Patient\/)/,'')
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue