Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resource for listing test days #110

Closed
thomasd-gea opened this issue May 22, 2020 · 6 comments · Fixed by #124
Closed

Resource for listing test days #110

thomasd-gea opened this issue May 22, 2020 · 6 comments · Fixed by #124

Comments

@thomasd-gea
Copy link
Contributor

thomasd-gea commented May 22, 2020

In our use case we want to deliver data to a milk recording organization (MRO) by retrieving the data from our system via an ICAR interface and converting the data into an ADIS file that can be sent to the MRO. To be able to send the data, the user needs to know:

  1. When was the end of the previous test day that was executed (because some MROs require/offer the user to send all milk visits since the last test day)
  2. What was the start/end date/time of the current test day

With that information, the relevant data can be collected through the ICAR milk visits API.

The data about the test days is available in our system, however, there is no resource type in the ICAR interface that allows us to transfer the values.

My proposal would be to provide a list of test day resources via the ICAR interface. As a follow-up improvement, the "TestDayResult" resource could even reference to one of that resources so they can easily be related.

@erwinspeybroeck
Copy link
Collaborator

As an MRO we know the testdays, and we can request data with the milking visits API with the right starting day using the parameter begin-date.

If I understand well you want an API that gives you these two testday informations? Or more generic the testdays in a certain period?

@thomasd-gea
Copy link
Contributor Author

thomasd-gea commented Jun 4, 2020

I think getting the testdays in a certain time period (e.g. in the last 6 month) would be sufficient. Something like "give me the last x testdays" would also work but is less aligned with the rest of the interface, I think.

In our case, although the MRO also knows the testdays, we have to generate the ADIS file for that testday. In that, we deliver all the milkvisits since the last test day and additionally the milk visits with the sampling information of the current test day. If we don't have the information about the testdays we will not know which/how many milk visits to sent to the MRO (unless we do some tracking in the client of the ICAR API, i.e. remember when we had the last test day; still, this does not solve the "initial" process).

@erwinspeybroeck
Copy link
Collaborator

I would think you would do the following :

  • create the ADIS files as you are doing now (I think it's an existing application?), indicating them as deprecated
  • offer API's for the MRO to request the milking visits they need

But we have a use case in which we need these dates for an app for the farmer, that wants to list the subsequent milk recordings, and then the farmer can choose one, after which the test day results for the selected test day is shown.

@thomasd-gea
Copy link
Contributor Author

Unfortunately, we're currently developing a new application that retrieves data via ICAR. Hence, we still need the additional data through the ICAR interface to collect the data necessary to have all data ready for the ADIS file creation.

On top of that, at least in case of the MRO we currently work with, I'm rather sure that there will be no acceptance of using an additional API.

@MetroMarv
Copy link

This is our very basic test day resource, that can easily be extended in the future. E.g. by adding list of affected animals or groups. Since this is a non breaking change we could include this in Version 1.x.x.

@cookeac
Copy link
Collaborator

cookeac commented Aug 17, 2020

Closing this now as implemented.

@cookeac cookeac closed this as completed Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants