Skip to content

Commit 8a2696c

Browse files
authored
Merge branch 'develop' into stefpiatek/admission_discharge_indexes
2 parents 4735e1c + 50b4c3f commit 8a2696c

File tree

18 files changed

+176
-11
lines changed

18 files changed

+176
-11
lines changed

.github/ISSUE_TEMPLATE/issue.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Copyright (c) University College London Hospitals NHS Foundation Trust
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
name: Story/Task
15+
description: Create a new story or task
16+
projects: ["UCLH-DHCT/4"]
17+
body:
18+
- type: markdown
19+
attributes:
20+
value: |
21+
Let's add a new task/story to the project
22+
- type: textarea
23+
id: definition_of_done
24+
attributes:
25+
label: Definition of Done / Acceptance Criteria
26+
description: What can someone see/do when this task is done.
27+
placeholder: "- [ ] The export data is available in the xxx format, including age of the patient at the time of imaging..."
28+
validations:
29+
required: true
30+
- type: textarea
31+
id: testing
32+
attributes:
33+
label: Testing
34+
description: Specific testing considerations for this task to be done
35+
placeholder: "- [ ] Passed integration testing that uses the correct modality..."
36+
validations:
37+
required: false
38+
- type: textarea
39+
id: documentation
40+
attributes:
41+
label: Documentation
42+
description: Documentation to be completed along with this task
43+
placeholder: "- [ ] Update module README and user guide..."
44+
validations:
45+
required: false
46+
- type: textarea
47+
id: dependencies
48+
attributes:
49+
label: Dependencies
50+
description: Enter the github issue number that the requirement is dependent on, in the form `- [ ] #1` to make a checklist
51+
placeholder: "- [ ] #1"
52+
validations:
53+
required: false
54+
- type: textarea
55+
id: details
56+
attributes:
57+
label: Details and Comments
58+
description: Other details or comments
59+
placeholder: The algorithm used is based on...
60+
validations:
61+
required: false

.github/workflows/comment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout documentation
12-
uses: actions/checkout@v2
12+
uses: actions/checkout@v4
1313
with:
1414
repository: SAFEHR-data/internal_emap_documentation
1515
token: ${{ secrets.GH_PAT_READ_AND_COMMENT }}

README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
# Emap
22

3-
A monorepo for all core Emap functions
3+
Experimental Medicine Application Platform (EMAP) produces a near real-time database
4+
containing clinical data for research and dashboard development within UCLH.
5+
6+
This is a non-operational “mirror” of a subset of UCLH data (historical and live).
7+
The underpinning aim is to ensure that no clinical data are corrupted or destroyed during the interaction
8+
between the research process and the hospital’s systems and that the systems are not compromised
9+
(for instance, that they are not interrupted or slowed down by research enquiries).
10+
11+
For more information about EMAP, please see the [docs](https://github.com/SAFEHR-data/emap/tree/main/docs)
12+
13+
## Developer onboarding
14+
15+
- How to [configure IntelliJ](docs/dev/intellij.md) to build emap and run tests.
16+
- [Onboarding](docs/dev/onboarding.md) gives details on how data items are processed and the test strategies used.
417

518
# Setup
619

@@ -20,12 +33,6 @@ EMAP [your root emap directory]
2033
│ ├── [etc.]
2134
```
2235

23-
## Developer onboarding
24-
25-
- How to [configure IntelliJ](docs/dev/intellij.md) to build emap and run tests.
26-
- [Onboarding](docs/dev/onboarding.md) gives details on how data items are processed and the test strategies used.
27-
28-
2936
# Monorepo migration
3037

3138
How were [old repos migrated into this repo?](docs/dev/migration.md)

core/src/main/java/uk/ac/ucl/rits/inform/datasinks/emapstar/controllers/PendingAdtController.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public void processMsg(HospitalVisit visit, PendingTransfer msg, Instant validFr
7575
RowState<PlannedMovement, PlannedMovementAudit> plannedState = getOrCreate(
7676
allFromRequest, visit, plannedLocation, msg.getPendingEventType().toString(), msg.getEventOccurredDateTime(), validFrom, storedFrom
7777
);
78+
addHospitalService(msg, plannedState);
7879
PlannedMovement plannedMovement = plannedState.getEntity();
7980
// If we receive a cancelled message before the original request then add it in
8081
if (plannedMovement.getEventDatetime() == null) {
@@ -159,6 +160,16 @@ private void deletePlannedMovement(PlannedMovement plannedMovement, Instant dele
159160
plannedMovementAuditRepo.save(plannedMovement.createAuditEntity(deletionTime, storedUntil));
160161
plannedMovementRepo.delete(plannedMovement);
161162
}
163+
164+
/**
165+
* Add hospital service.
166+
* @param msg PendingTransfer
167+
* @param movementState movement wrapped in state class
168+
*/
169+
private void addHospitalService(final PendingTransfer msg, RowState<PlannedMovement, PlannedMovementAudit> movementState) {
170+
PlannedMovement movement = movementState.getEntity();
171+
movementState.assignInterchangeValue(msg.getHospitalService(), movement.getHospitalService(), movement::setHospitalService);
172+
}
162173
}
163174

164175
/**

core/src/test/java/uk/ac/ucl/rits/inform/datasinks/emapstar/adt/TestPendingAdt.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ void testPendingCreatesPlannedMovement() throws Exception {
9696
assertEquals(EVENT_TIME, plannedMovement.getEventDatetime());
9797
assertEquals(PendingType.TRANSFER.toString(), plannedMovement.getEventType());
9898
assertNull(plannedMovement.getCancelledDatetime());
99+
assertEquals("Head and Neck - OMFS", plannedMovement.getHospitalService());
99100
}
100101

101102
/**

docs/Glossary.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,10 @@
324324

325325
## T
326326

327+
- <a id="tdl">**TCI**</a>
328+
329+
To Come In (a patient is TCI for ward X if they are on the way to the ward but not admitted).
330+
327331
- <a id="tdl">**TDL**</a>
328332

329333
The Doctors Laboratory provide the biochemistry and microbiology analysis for the hospital.

emap-interchange/src/main/java/uk/ac/ucl/rits/inform/interchange/adt/CancelPendingTransfer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
public class CancelPendingTransfer extends AdtMessage implements PendingEvent, AdtCancellation {
2222
private PendingType pendingEventType = PendingType.TRANSFER;
2323
private InterchangeValue<String> pendingDestination = InterchangeValue.unknown();
24+
private InterchangeValue<String> hospitalService = InterchangeValue.unknown();
2425
private Instant cancelledDateTime;
2526

2627

emap-interchange/src/main/java/uk/ac/ucl/rits/inform/interchange/adt/PendingEvent.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,16 @@ public interface PendingEvent {
2121
* @param location Concatenated location string
2222
*/
2323
void setPendingDestination(InterchangeValue<String> location);
24+
25+
26+
/**
27+
* @return Hospital service from PV1-10.
28+
*/
29+
InterchangeValue<String> getHospitalService();
30+
31+
/**
32+
* @param hospitalService
33+
*/
34+
void setHospitalService(InterchangeValue<String> hospitalService);
35+
2436
}

emap-interchange/src/main/java/uk/ac/ucl/rits/inform/interchange/adt/PendingTransfer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
public class PendingTransfer extends AdtMessage implements PendingEvent {
2020
private PendingType pendingEventType = PendingType.TRANSFER;
2121
private InterchangeValue<String> pendingDestination = InterchangeValue.unknown();
22+
private InterchangeValue<String> hospitalService = InterchangeValue.unknown();
2223

2324
@Override
2425
public void processMessage(EmapOperationMessageProcessor processor) throws EmapOperationMessageProcessingException {

emap-interchange/src/test/resources/AdtMessages/pending/A15.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,7 @@ modeOfArrival:
5454
"@class": "uk.ac.ucl.rits.inform.interchange.InterchangeValue"
5555
status: "SAVE"
5656
value: "Walk-in"
57-
57+
hospitalService:
58+
"@class": "uk.ac.ucl.rits.inform.interchange.InterchangeValue"
59+
status: "SAVE"
60+
value: "Head and Neck - OMFS"

0 commit comments

Comments
 (0)