diff --git a/his/app/src/App.js b/his/app/src/App.js index 67f9509..49fd794 100644 --- a/his/app/src/App.js +++ b/his/app/src/App.js @@ -1,6 +1,7 @@ import React from "react"; import { Link, + NavLink, Outlet, } from "react-router-dom"; import "./Index.css"; @@ -8,9 +9,11 @@ const App = () => { return (
diff --git a/his/app/src/Connections.js b/his/app/src/Connections.js index 6a35d1f..ca2019f 100644 --- a/his/app/src/Connections.js +++ b/his/app/src/Connections.js @@ -81,7 +81,8 @@ const Connections = () => { return (
- Nieuwe connectie +

Verbindingen

+ Nieuwe verbinding @@ -89,7 +90,7 @@ const Connections = () => { - + @@ -100,11 +101,18 @@ const Connections = () => { - + ) })} diff --git a/his/app/src/Home.js b/his/app/src/Home.js index 60d9581..2f920bc 100644 --- a/his/app/src/Home.js +++ b/his/app/src/Home.js @@ -3,7 +3,9 @@ import "./Index.css"; const App = () => { return ( -
+
+

Welkom bij MYHIS

+
); }; diff --git a/his/app/src/Index.css b/his/app/src/Index.css index 0a593c2..f0ae279 100644 --- a/his/app/src/Index.css +++ b/his/app/src/Index.css @@ -1,5 +1,5 @@ body { - font-family: helvetica; + font-family: Helvetica, Arial, sans-serif; } * { margin: 0; padding: 0; box-sizing: border-box; } @@ -16,8 +16,20 @@ h2 { box-shadow: 2px 2px 10px rgba(0,0,0,0.1); } +.c-main-nav__main { + display: flex; + justify-content: space-between; + flex:1; +} + .c-main-nav a {display: block; padding: 5px; color: #137ad4; text-decoration: none} +.c-main-nav p a {color: black} +.c-main-nav .active {font-weight:bold; text-decoration: underline} +.t-page-header { + margin-bottom: 50px; +} + .c-table { width: 100%; } @@ -46,7 +58,7 @@ h2 { font-size: 95%; color: white; background-color: #137ad4; - border: 0; + border: 1px solid #137ad4; outline: 0; cursor: pointer; margin-bottom: 10px; @@ -54,6 +66,13 @@ h2 { text-decoration: none; } +.c-button--default { + + background-color: white; + color: #137ad4; + +} + .c-button--sm { padding: 4px 8px; font-size: 80%; @@ -106,7 +125,7 @@ h2 { } .c-form-row { - margin-bottom: 10px; + margin-bottom: 15px; } .c-input { @@ -117,6 +136,7 @@ h2 { display: block; outline: none; font-size: 95%; + font-family: Helvetica, Arial, sans-serif; } input:disabled { diff --git a/his/app/src/ManageConnection.js b/his/app/src/ManageConnection.js index d7aa13c..96fa0e1 100644 --- a/his/app/src/ManageConnection.js +++ b/his/app/src/ManageConnection.js @@ -65,6 +65,7 @@ const ManageConnection = () => { return (
+

Verbinding

Systeem Leverancier StatusActieve dienstenDiensten Acties
{x.System ? x.System : 'Onbekend'} {x.Supplier ? x.Supplier : 'Onbekend'} {x.State == "pending" ? 'in afwachting' : 'actief'}{x.Services.length ? x.Services.map((s) => { - return {s.Name} - }) : '-'}{ + x.State == "pending" ? "" : ( + x.Services.length ? x.Services.map((s) => { + return {s.Name} + }) : Beschikbare diensten + )} - {x.State == "pending" ? Activeer : Beheer} + {x.State == "pending" ? ( + Afronden verbinding + ) : ( + x.Services.length ? Beheer : Activeer + )}
@@ -86,8 +87,8 @@ const ManageConnection = () => { - - + {!connection || connection.State == "pending" ? null : } + {!connection || connection.State == "pending" ? null : } @@ -98,8 +99,8 @@ const ManageConnection = () => { - - )} + {!connection || connection.State == "pending" ? null : ( + })} ) }) } diff --git a/his/app/src/Patients.js b/his/app/src/Patients.js index 936633b..9ebc7ff 100644 --- a/his/app/src/Patients.js +++ b/his/app/src/Patients.js @@ -4,7 +4,6 @@ import { Link, useParams, useLocation } from "react-router-dom"; import "./Index.css"; import { policy, needConsent } from "./ManageConnection"; import format from "date-fns/format"; -import formatRelativeWithOptions from "date-fns/esm/fp/formatRelativeWithOptions/index"; const hasConsent = (patient, service) => { let consent = patient.Consent.filter(x => x.ServiceID == service.ServiceID)[0] @@ -69,7 +68,7 @@ const DropDown = ({patient, services, updateSubscription, loading, saveConsent, className="c-button c-button--sm" onClick={e => e.preventDefault() || e.stopPropagation() || setOpen(true)} > - Opties + Aanmelden
{x.Name} {needConsent(x) ? : null} @@ -166,7 +165,7 @@ export const ConsentModal = ({loading, close, service, patient, saveConsent, rem setConsent(Object.assign({}, consent, {Brochureversion: x.target.value}))} value={consent.Brochureversion} type="text"/>
- @@ -251,18 +250,23 @@ const Patients = () => { return (
-
Omschrijving Aanmeldpolicy ToestemmingspolicyStatusActiesStatusActies
{x.description} {policy(x)} {needConsent(x) ? 'expliciet' : 'verondersteld'}{isActive(connection, x) ? 'actief' : 'inactief'}{ + {!connection || connection.State == "pending" ? null : ({isActive(connection, x) ? 'actief' : 'inactief'}{ isActive(connection, x) ? ( ) - }
+

Patienten

+
+ + + - - - {patients.map(x => { return ( + + + + - - - ) })} diff --git a/his/main.go b/his/main.go index e8759f4..30eb253 100644 --- a/his/main.go +++ b/his/main.go @@ -8,32 +8,23 @@ import ( "sync" ) -var srvaddr = "localhost:8888" -var patientIf = "localhost:8084" +var localAddr = "0.0.0.0:8084" +var externalAddr = "http://localhost:8084" func main() { stop := make(chan os.Signal, 1) signal.Notify(stop, os.Interrupt) wg := &sync.WaitGroup{} - // register(srvaddr) - // fmt.Println("Enter ref: ") + if os.Getenv("LOCAL_ADDR") != "" { + localAddr = os.Getenv("LOCAL_ADDR") + } - // // var then variable name then variable type - // var ref string + if os.Getenv("EXT_ADDR") != "" { + externalAddr = os.Getenv("EXT_ADDR") + } - // // Taking input from user - // fmt.Scanln(&ref) - // fmt.Println("Enter psk: ") - // var psk string - // fmt.Scanln(&psk) - // complete(srvaddr, ref, psk) - // listMeta(srvaddr) - // enableService(srvaddr, "wbx:visitelijst") - // subscribePatients(srvaddr, "wbx:visitelijst", patients) - // listSubscriptions(srvaddr, "wbx:visitelijst") - - srv := NewServer(patientIf) + srv := NewServer(localAddr) srv.LoadData("./data/data.db") go func() { diff --git a/his/openapiclient.go b/his/openapiclient.go index d77f43b..bb99bb5 100644 --- a/his/openapiclient.go +++ b/his/openapiclient.go @@ -213,7 +213,7 @@ func (srv *HISServer) enableService(conn *model.Connection, service string, acti Fetch: &openkv.ServiceConfig{ Protocol: "https://whiteboxsystems.nl/protospecs/whitebox-fetch/http", Config: map[string]string{ - "url": "http://localhost:8084/external/api", + "url": externalAddr + "/external/api", }, Auth: &openkv.AuthConfig{ Method: openkv.AuthMethod_APIToken, @@ -222,7 +222,30 @@ func (srv *HISServer) enableService(conn *model.Connection, service string, acti Push: &openkv.ServiceConfig{ Protocol: "https://whiteboxsystems.nl/protospecs/whitebox-push/http", Config: map[string]string{ - "url": "http://localhost:8084/external/api", + "url": externalAddr + "/external/api", + }, + Auth: &openkv.AuthConfig{ + Method: openkv.AuthMethod_APIToken, + }, + }, + }) + } else if m, _ := regexp.MatchString("voorbeeld:*", service); m { // Kis + resp, err = client.ConfigService(context.Background(), &openkv.ConfigServiceRequest{ + Service: service, + Enabled: active, + Fetch: &openkv.ServiceConfig{ + Protocol: "https://whiteboxsystems.nl/protospecs/whitebox-fetch/http", + Config: map[string]string{ + "url": externalAddr + "/external/api", + }, + Auth: &openkv.AuthConfig{ + Method: openkv.AuthMethod_APIToken, + }, + }, + Push: &openkv.ServiceConfig{ + Protocol: "https://whiteboxsystems.nl/protospecs/whitebox-push/http", + Config: map[string]string{ + "url": externalAddr + "/external/api", }, Auth: &openkv.AuthConfig{ Method: openkv.AuthMethod_APIToken, @@ -236,7 +259,7 @@ func (srv *HISServer) enableService(conn *model.Connection, service string, acti Fetch: &openkv.ServiceConfig{ Protocol: "https://hl7.org/fhir", Config: map[string]string{ - "url": "http://localhost:8084/external/fhir/Patient", + "url": externalAddr + "/external/fhir/Patient", }, Auth: &openkv.AuthConfig{ Method: openkv.AuthMethod_APIToken, @@ -245,7 +268,7 @@ func (srv *HISServer) enableService(conn *model.Connection, service string, acti Push: &openkv.ServiceConfig{ Protocol: "https://hl7.org/fhir", Config: map[string]string{ - "url": "http://localhost:8084/external/fhir/Patient", + "url": externalAddr + "/external/fhir/Patient", }, Auth: &openkv.AuthConfig{ Method: openkv.AuthMethod_APIToken,
NaamGeboortedatumBSN ActiesNaamGeboortedatumBSN
{x.Name}{x.Birthdate}{x.ExternalId} {services.length ? { removeConsent={removeConsent} /> : null} {x.Name}{x.Birthdate}{x.ExternalId}