The current dreem data transfer service that uses the inventory should use UCAM instead once #15 implemented.
Previously, the code used the inventory API to determine which patients used which devices and when. This implementation now uses the UCAM API in addition to the inventory and simplifies the logic for how this is determined.
Testing
Uncomment all but the metadata attribute in the dreem DAG.
Configure main.py to auth and make queries to newcastle
Ensure mongoDB is running (poetry run compose) and drop the records collection.
Run the code and you'll see that a large portion of records is created for the data.
Note: I added print statements as logging as we can replace the print call with outputting to the log in the future and this is useful when running locally either way.
Previously, the code used the inventory API to determine which patients used which devices and when. This implementation now uses the UCAM API in addition to the inventory and simplifies the logic for how this is determined.
Testing
main.py
to auth and make queries tonewcastle
poetry run compose
) and drop therecords
collection.Note: I added print statements as logging as we can replace the
print
call with outputting to the log in the future and this is useful when running locally either way.