I tried but I couldn’t make any reports with cohort definitions. I was not able to complete the Patient Visit Report. Rafal told that it was okay, and let’s keep it to the end. Today we had the weekly meeting for GSoC project.
Thanks for coming for the weekly meeting yesterday. I was able to solve the above mentioned test failure. Now the module builds without no exceptions. Here is the Pull Request I made for my last week work:
This week task:
Implement the selected reports using cohorts.
Try to write test overages for already implemented reports
This is my current state of almost the end of 2nd week.
We were discussed in our last meeting to create the New Patient Registrations reports using cohorts. I spent many days trying to create this report through the reporting module UI. It seems that date_created of a patient is not possible to retrieve through the existing data definitions.
When I look at the rest of the reports, they are moreover to metadata than patient specific data. For all those reports, the default cohort which is All Patients is good enough.
Last Tuesday (13th-June-2017) we had the weekly meeting. We were discussed on the the work which I was doing in the 2nd week. Rafal had a look on the half-baked report which I created. He tried to help me to setup the demoreporting module in my local machine, but we couldn’t set it up as the provided metadata SQL file wasn’t compatible with the code.
Week 3 tasks:
Finish the New Patient Registrations report.
Write Unit Test coverage for that report.
(I have already created that report through reporting module, currently I’m implementing it in java code)
I have implemented the New Patient Registrations report using cohorts inside the referenceApplication module. I have also written the test coverage for that report. I made slight changes for package structure (may be new way would bring more clarity) . Appreciate your feedback.
It’s almost end of 3rd week of GSoC 2017 coding phase timeline (9 weeks left ). I have been working on this project since the day it was announced. @raff and @ssmusoke gave me immense support in many ways. Up to now, I have implemented the following reports (or rather components as @mseaton called it )
Number or Visits
Number of Patient Registrations
Number of Admissions/Transfers/Discharges per service area
Number of Visit Notes
List of Diagnosis’s made and quantity
List of Providers (grouped by active/retired)
List of Users (grouped by active/retired)
List of new Patient Registrations
Patient Visit Report (This has not done)
All these reports have implemented inside the referenceApplication module. All cohorts definitions, libraries and everything resides inside this module at the moment. We had a discussion over this few weeks back whether we need to move some potion of this to referencemetadata module or not. If we are going to move to referencemetadata module what sort of things needs to be take in there?
@judeniroshan, moving all your changes so far to referencemetadata will be all what is needed. It should be quick.
I’m sorry for misguiding you about putting the code in the referenceapplication module, whereas it should go to the referencemetadata module as it was discussed in this thread above.
I made the PR to openmrs-module-referencemetadata. I have a minor change to be done for 3 or 4 test cases. Apart from that the reports which we were discussed have completed. I think it’s now time start working on exposing these reports to outside. Can you please point me where to start off with that?
It’s been a while since I could update this thread, as I was bit busy with my college work. However it’s all done now and I’m much more focused over here. I have created a simple react component for List of Users report. I have not much concerned about the styling yet.
I have created the components for rest of the reports as well. Here is the commit I have made for it.
I’m still a newbie to ReactJS. I couldn’t find the way to display the report components when an item has been clicked from the navigation bar. I think, it shouldn’t redirect to a new page, instead it should it done as in a SAP (Single Page Application). Any advice on it?
I have written the component in more generic way. That’s why the date is being showing as an integer.
Extract out the common UI styling and make a separate npm module (for others to use in future)
Is there anything that is missing in this targeted task list?
@raff, I was trying to implement a simple navigation using react-router-dom v4.0.0. I have noticed that in the OWA which I generated through OpenMRS OWA generator has included react-router v.3 by default. It is said that react-router is deprecated and to use react-router-dom. So, I added that dependency to my module and tried to implement the navigation functionality. But I’m stuck on it.
If anyone knows a way to get around with this, please feel free to answer to my question in StackOverflow.
Last Tuesday I had the weekly meeting with my mentor Rafal. There we planned the following work for this week:
Generalized table component for all the reports (Done)
Complete the navigation panel (Done)
Adjust the styling (Done)
Integrate Chart.js
I have created a component for reports to show in tabular format. There is a problem which I’m currently trying to solve that I couldn’t run a report through reporting REST. Reports which accepts a location as a parameter, I couldn’t run them through API.
I have integrated the Jest and SinonJS(mock HTTP calls) for the new OWA UI testing. I have committed what I have done so far.
I have an issue to mock the HTTP call which I make inside the component. This call is actually generated inside the componentDidMount() life cycle method. When I compare it with the cohort builder OWA, they have made this API endpoint as a prop. In this case, they were able to inject a mock at runtime of testing.
Should I follow the same approach of taking out the API endpoint? Then again the users of this component has to provide the API endpoint everytime they are using this react component.
I have implemented the Date picker and used it to take the user inputs. But this particular report is keep redirecting and doesn’t render anything. I couldn’t find out why it is happening like that. Could you please point out what I’m doing wrong here?
I was able to fix that issue. It was because when I simply set the state, I only set the updated the element. Because of that the rest of the elements are getting cleared off from the state. I used the previous state values and set it.
In fact the redirect is happening because the parameters for the reporting rest API call doesn’t made properly.