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

(Feature) Patient Check In #477

Merged
merged 6 commits into from
Jun 10, 2016
Merged

Conversation

sfount
Copy link
Contributor

@sfount sfount commented Jun 9, 2016

This pull request implements the first iteration on the 2.x check in feature.

This allows a patient to be checked in and provides information on a patients hospital visit status. It is integrated in the the Patient Record page and is implemented as a nested view.

@IMA-WorldHealth/local-contributors This method of using a nested view should be contrasted with developing sub modules as components #452. Once we have established the benefits and limits we can select one for going forward.

Patient recently visited
checkin_recent

Patient never visited
checkin_never

Patient visited previously but not recently
checkin_not_recently

Patient checking in
checkin_checking_in

Note that this pull request updates the bh-loading-button component to allow the button style to be overriden if required by the controller. In the future this can be done with a default transclude however for now it is set through the optional button-class attribute (default btn-primary).

Closes #464
Closes #469


  • Run your code through JSHint. Check out our styleguide.
    • Run integration tests.
    • Run end-to-end tests.
    • Accurately described the changes your are making in this pull request.

This commit introduces the patient check in ui elements and controller. It
also demonstrates the basic pattern for using a named nest ui-view within
a template. This can be contrasted with units as components.
This commit introduces the server structure for patient check ins,
allowing a request for all patient visits. It also introduces the initial
files and methods for testing the API.
This commmit introduces the end point to write to the patient_visit table
along with integration tests.
* Introduced client side check in service as a child of the
  `PatientService`
* ?limit querystring for /patients/:uuid/visits to limit the number of
  responses
This commit adds business logic that determines if the patient has
recently bene checked in and ensures the view displays the correct
warnings.
.state('patientRecord.details', {
url : '',
views : {
'checkin@patientRecord' : {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need the @patientRecord part of the view definition?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was playing around with absolute vs. relative names to see how specific these routes could get - as this is a fairly simple heirachy this will work just using the checkin namespace.

@jniles
Copy link
Collaborator

jniles commented Jun 9, 2016

@sfount, finshed a review. Code generally looks good, the screenshots look excellent!

It's not clear whether a component or a ui-view is better for embedding these panels. I do not see an immediate benefit to either - except that components are more familiar to developers. Do you have any thoughts?

I'll give you a chance to respond to the feedback here, and then will merge or wait for fixes. Nothing blocking in this PR.

@sfount
Copy link
Contributor Author

sfount commented Jun 9, 2016

@jniles all of your suggestions have been incorperated.

Regarding ui-view vs. components I don't think there's a clear choice.
In my opinion the following reads very well:

<div ui-view="checkin"></div>
<div ui-view="documents"></div>
<div ui-view="latestBill"></div>

However this would look similar with components. One advantage of components may also be the standardisation of writing unit tests for components. I didn't come up with a clear way to unit test this sub module.

Either method makes sense to me, it may become clearer after we have more examples.

* End to end tests for checkin functionality
* Complete check in request client side
* Update view with latest check ins
* Reduce space between list elements on patient overview
* Remove references to previous patient visit implementations
@jniles
Copy link
Collaborator

jniles commented Jun 10, 2016

LGTM and tests pass!

@jniles jniles merged commit 6529dc5 into IMA-WorldHealth:master Jun 10, 2016
@sfount sfount mentioned this pull request Jun 13, 2016
4 tasks
@sfount sfount deleted the feature-check-in branch June 29, 2016 14:46
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 this pull request may close these issues.

2 participants