Comments (4)
UuidRestController should have a utility for logging Registrations. And the templated POST and PUT endpoints should log successful Registrations.
from openhds-rest.
This would be an incredibly useful feature if you can manage it.
from openhds-rest.
In the code I'm working from (here) I didn't find any integration tests. So I'm making up some of the behavior in a way that seems reasonable to me.
The behavior might need to be updated by someone who understands the events requirements better. I am not going to block on this.
Here is the behavior I'm going to implement and test before moving on:
Services can create Events, which represent anything interesting. Events have a string data payload and some queryable fields like entity type, action type, date-time, and user.
Events are also associated with EventMetadata, which keep track of external systems that are interested in the Events. The EventMetadata identify an external system, the status of an event as viewed by that system, and the number of times the system has read a given Event.
External systems should not care about each other, so changes to the Metadata associated with one system should not effect the Metadata associated with another system.
If a new external system queries for events, it sees all events. As a side effect of the query, new default EventMetadata are created for that system and associated with all events.
If the same system queries for events again, the query will make use of the existing metadata. This will allow interesting queries like "get all the events that this system hasn't read yet".
from openhds-rest.
2bc95ac contains events model, service, and resource, and tests as described above.
from openhds-rest.
Related Issues (20)
- Use cases, documentation, and tests for essential functionality. HOT 7
- Detect update conflicts? With record revision numbers? HOT 3
- Discuss openhds-rest with CIMS Bioko team
- Add logging HOT 2
- Location-based queries HOT 2
- Demonstrate integration with openhds-tablet HOT 3
- Make sure REST controllers are generating links to all endpoints. HOT 1
- Optimize Queries for LocationHierarchy Sub-trees
- Disable basic auth on localhost HOT 3
- Initial application setup does not create events table HOT 1
- OPTIONS requests should not require authorization
- Pregnancy Result fails to create new individual
- Security implementation complicates design of browser based clients
- Credentials for Users and Fieldworkers should not be returned by the service
- Better validation and error messages
- Create a deploy plan for the database
- User roles should have domain semantics rather than crud semantics
- Validate structure and uniqueness of extId
- Poorly formed extIds should be flagged for review
- Submitting a membership does not link uuid for individual or socialgroup correctly HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openhds-rest.