Commit b1211885 authored by R.W.Majeed's avatar R.W.Majeed

datastructures and diagrams extented

parent 6a52f7ef
......@@ -6,8 +6,60 @@ Generate XSD files:
"$JAVA_HOME"/bin/schemagen -d target -cp target/classes org.aktin.exchange.Query
```
At node: required configuration for certificate
-----------------
my.name
my.email
my.oid
my.organisation
my.state
my.country
Broker/pool identifies node by its oid
At node: Register new broker
---------------------------
Only once: Add+trust certification-authority (ca) certificate manually, multiple trusted CAs are possible
GET /broker/ca.cert (outside of TLS area) or other way to retrieve cert chain from ssl connection: http://stackoverflow.com/questions/6755180/java-ssl-connect-add-server-cert-to-keystore-programatically )
if ca.cert not trusted, abort with message "Broker not trusted (add CA name)"
if no private key, generate private key
if no response from CA in keystore,
display certification request to submit to CA
display textfield to paste response
abort
connect with keystore to broker
GET /broker/welcome
Show welcome message
goto query exchange
Query exchange
--------------
Outbound connections during fixed times or on-demand
IF unsubmitted queries pending
Node connects to Pool
Node submits query results
Node closes connections to Pool
ENDIF
Node connects to Broker (HTTP keep-alive, gzip-compression)
Node submits node status
IF first time
Node requests open queries
ELSE
Node requests queries (modified since last-contact)
END IF
Node stores queries
Node submits status for all queries (modified since last contact)
Node closes connection to Broker
Node sets last-contact to timestamp when the broker-connection was established.
Message Feature
--------
Broker may store messages (broadcasts), which can be
fetched by the nodes.
```
<request>
<id>unique request id</id>
......@@ -60,85 +112,6 @@ Query exchange
</broker>
</query>
<request-status ref="123">
<last-modified>max timestampt der nachfolgenden</last-modified>
<received>XXXtimestamp</received>
<confirmation method="single|double|automatic">xxx</confirmation>
<!-- confirmation or rejection -->
<rejected></rejected><!-- manually rejected -->
<!-- may also automatically reject requests:
reject all because of vacation,
reject specific recurring query -->
<reject-reason>La la la</reject-reason>
<comment></comment>
<last-execution>
<completed>XXXtimestamp</completed>
<failed></failed><!-- may fail due to technical reasons -->
</last-execution>
<last-contact>
<result-submitted>XXX timestamp</result-submitted>
</request-status>
<query-result request-ref="1">
<timestamp>2015-12-02T18:30:14</timestamp>
<execution-time>P10S</execution-time>
<result xsi:type="aggragated-result">
<value id="cedis-count">321</value>
<breakdown id="gender">
<value id="male">110</value>
<value id="female">112</value>
</breakdown>
</result>
<!-- or -->
<result xsi:type="export-result">
<table id="patients">
<headers>
<header>id</header>
<header>birthdate</header>
</headers>
<tr>
<td>1</td>
<td>2010-01-01</td>
</tr>
</table>
<table id="visits">
<headers>
<header>patient-ref</header>
<header>id</header>
<header>start</header>
</headers>
<tr>
<td>1</td>
<td>1</td>
<td>2016-05-08T09:32:00</td>
</tr>
</table>
<table id="diagnoses">
<headers>
<header>patient-ref</header>
<header>visit-ref</header>
<header>start</header>
<header>code</header>
</headers>
<tr>
<td>1</td>
<td>1</td>
<td>2016-05-08T09:32:00</td>
<td>R46.1</td>
</tr>
<tr>
<td>1</td>
<td>1</td>
<td>2016-05-08T09:32:00</td>
<td>W46.05</td>
</tr>
</table>
</result>
</query-result>
<nodeStatus>
<module artifact="dwh-api" version="0.1-SNAPSHOT"/>
......
@startuml
box "Hospital"
participant "AKTIN Data Warehouse" as DWH
end box
participant "AKTIN Broker" as Broker
participant "AKTIN Pool" as Pool
activate DWH
DWH->Broker : submit node-status
activate Broker
DWH->Pool : submit completed query results
DWH->Broker : retrieve query requests
Broker->DWH : list of requests
DWH->Broker : submit request status
deactivate Broker
@enduml
\ No newline at end of file
@startuml
box "Hospital"
actor "Emergency Room" as ER
participant "AKTIN Data Warehouse" as DWH
end box
participant "AKTIN Broker" as Broker
participant "AKTIN Pool" as Pool
actor "Epidemiologist" as Epi
actor Researcher
activate ER
ER->DWH : Emergency note records
deactivate ER
activate Researcher
Researcher->Broker : query
deactivate Researcher
...
DWH->Broker : exchange / ask for requests
activate DWH
activate Broker
Broker->DWH : new query request
deactivate Broker
DWH->ER : notification
deactivate DWH
activate ER
...
ER->DWH : new request verified
deactivate ER
activate DWH
DWH->DWH : perform query
DWH->Pool : submit results
deactivate DWH
activate Pool
...waiting for results from other hospitals...
Pool->Epi : complete results
deactivate Pool
activate Epi
Epi->Epi : performs analysis
Epi->Researcher : analysis results
deactivate Epi
activate Researcher
@enduml
\ No newline at end of file
......@@ -4,27 +4,44 @@ box "Hospital"
participant "AKTIN Data Warehouse" as DWH
end box
participant "AKTIN Broker" as Broker
participant "AKTIN Pool" as Pool
actor "Epidemiologist" as Epi
actor Researcher
activate ER
ER->DWH : Emergency note records
deactivate ER
activate Researcher
Researcher->Broker : query
deactivate Researcher
...
DWH->Broker : ask for query requests
DWH->Broker : exchange / ask for requests
activate DWH
activate Broker
Broker->DWH : new query request
deactivate Broker
DWH->ER : notification
activate ER
...
ER->DWH : new request verified
deactivate ER
DWH->DWH : perform query
opt
DWH->ER : result notification
activate ER
...
ER->DWH : result verified
deactivate ER
end
DWH->Broker : submit results
DWH->Pool : submit results
deactivate DWH
activate Pool
...waiting for results from other hospitals...
Broker->Epi : complete results
Pool->Epi : complete results
deactivate Pool
activate Epi
Epi->Epi : performs analysis
Epi->Researcher : analysis results
opt
Epi->Researcher : k-anonymized Data set
end
deactivate Epi
activate Researcher
@enduml
\ No newline at end of file
<node-status>
<!-- when the status was collected -->
<timestamp>now</timestamp>
<!-- duration the (application)server is running -->
<uptime></uptime>
<!-- timestamp when the latest data/CDA was imported -->
<latest-import></latest-import>
<!-- version number of the running EAR, all other versions
can be deduced from the release POM -->
<!-- get this info via new InitialContext().lookup("java:app/AppName") -->
<software>dwh-ear-0.2-SNAPSHOT</software>
</node-status>
\ No newline at end of file
......@@ -5,7 +5,7 @@
<id>123</id>
<description>Lala</description>
<principal>
<name>Prince Ipal</name>
<name>Principal</name>
<organisation>AKTIN</organisation>
<email>it-support@aktin.org</email>
<phone>+49 (441) 798 - 2772</phone>
......@@ -13,6 +13,7 @@
<schedule xsi:type="repeatedExecution">
<duration>-1W</duration>
<interval>P1D</interval>
<!-- created timestamp? -->
</schedule>
<concepts>
<concept id="birthdate" xsi:type="raw"/>
......
<query-result request-ref="1" xmlns="http://aktin.org/ns/exchange"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<timestamp>2015-12-02T18:30:14</timestamp>
<execution-time>P10S</execution-time>
<result xsi:type="result-tables">
<table id="patients">
<thead>
<tr>
<td>id</td>
<td>birthdate</td>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>2010-01-01</td>
</tr>
</tbody>
</table>
<table id="visits">
<headers>
<header>patient-ref</header>
<header>id</header>
<header>start</header>
</headers>
<tr>
<td>1</td>
<td>1</td>
<td>2016-05-08T09:32:00</td>
</tr>
</table>
<table id="diagnoses">
<headers>
<header>patient-ref</header>
<header>visit-ref</header>
<header>start</header>
<header>code</header>
</headers>
<tr>
<td>1</td>
<td>1</td>
<td>2016-05-08T09:32:00</td>
<td>R46.1</td>
</tr>
<tr>
<td>1</td>
<td>1</td>
<td>2016-05-08T09:32:00</td>
<td>W46.05</td>
</tr>
</table>
</result>
<!-- OR <result xsi:type="aggragated-result"> <value id="cedis-count">321</value>
<breakdown id="gender"> <value id="male">110</value> <value id="female">112</value>
</breakdown> </result> -->
</query-result>
\ No newline at end of file
......@@ -9,6 +9,9 @@
<organisation>AKTIN</organisation>
<email>it-support@aktin.org</email>
<phone>+49 (441) 798 - 2772</phone>
<!-- optional cryptographic signature at a later release
<signature></signature>
-->
</principal>
<schedule xsi:type="singleExecution">
<duration>-P1M</duration>
......
<request-status ref="123">
<!-- not needed
<last-modified>max timestampt der nachfolgenden</last-modified>
-->
<received>XXXtimestamp</received>
<execution>
<verification method="manual|auto-confirm|auto-reject">
<confirmed></confirmed>
<rejected></rejected>
<comment>
</comment>
</verification>
<!-- may also automatically reject requests: reject all because of vacation,
reject specific recurring query -->
<!-- latest execution. the site may choose to execute the query again -->
<timestamp>XXX start timestamp</timestamp>
<completed>XXXtimestamp</completed>
<failed></failed><!-- may fail due to technical reasons -->
<description>
<!-- exception stack trace if failed -->
</description>
</execution>
<submission>
<verification method="manual|auto-confirm|auto-reject">
<confirmed></confirmed>
<rejected></rejected>
<comment>
</comment>
</verification>
<!-- may also automatically reject requests: reject all because of vacation,
reject specific recurring query -->
<timestamp>2016-07-06T03:30:14Z</timestamp>
<completed>2016-07-06T03:30:14Z</completed>
<!-- submission may fail, e.g. if the receiving server is not available -->
</submission>
</request-status>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment