-
Notifications
You must be signed in to change notification settings - Fork 426
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
AC-1080: Appointment Scheduling Integration #1000
Conversation
AC-1080: Add representation AC-1080: Add repository AC-1080: Refactor properties
…penmrs/openmrs-contrib-android-client into AC-1080-Appointment-Scheduling
…penmrs/openmrs-contrib-android-client into AC-1080-Appointment-Scheduling
.idea/runConfigurations.xml
Outdated
@@ -1,12 +0,0 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undo changes that are not relevant
|
||
class TimeSlot( | ||
|
||
@Expose var appointmentBlock: AppointmentBlock? = null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Expose var appointmentBlock: AppointmentBlock? = null, | |
@Expose | |
var appointmentBlock: AppointmentBlock? = null, |
@@ -0,0 +1,30 @@ | |||
package com.openmrs.android_sdk.library.models |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copywright
|
||
class Appointment( | ||
|
||
@Expose var timeSlot: TimeSlot? = null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Expose var timeSlot: TimeSlot? = null, | |
@Expose | |
var timeSlot: TimeSlot? = null, |
|
||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just one is enough
import javax.inject.Singleton | ||
|
||
@Singleton | ||
class AppointmentRepository @Inject constructor() : BaseRepository(){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class AppointmentRepository @Inject constructor() : BaseRepository(){ | |
class AppointmentRepository @Inject constructor() : BaseRepository() { |
} | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | |
) | |
}) |
* | ||
* @return the TimeSlot object | ||
*/ | ||
fun createTimeSlot(timeSlot: TimeSlot): Observable<TimeSlot>{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add spacing in all remaining functions
} | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | |
) | |
} | |
) |
} | |
) | |
}) |
Add this change in all remaining functions
if (response.isSuccessful && response != null) { | ||
return@Callable response.body()!! | ||
} else { | ||
logger.e("Error creating Time Slot: " + response.message()) | ||
throw Exception(response.message()) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can create a function instead of repeating the same lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed! Updated the PR by creating a function using Generics
…penmrs/openmrs-contrib-android-client into AC-1080-Appointment-Scheduling
Undo irrelevant changes
.idea/runConfigurations.xml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted the irrelevant changes
Pushed the requested changes. Please have a look now :) |
Description of what I changed
Issue I worked on
JIRA Issue: https://issues.openmrs.org/browse/AC-1080
Checklist: I completed these to help reviewers :)
(the number above, next to the 'Commits' tab is 1).
existing code that was well tested you do not have to add tests)