Skip to content

bed revision v1#714

Merged
vigneshhari merged 2 commits into
ohcnetwork:bed-revision-1from
arpancodes:bed-revision-v1
Apr 14, 2022
Merged

bed revision v1#714
vigneshhari merged 2 commits into
ohcnetwork:bed-revision-1from
arpancodes:bed-revision-v1

Conversation

@arpancodes
Copy link
Copy Markdown
Contributor

  • Remove:

    • AdmittedTo in Consultation
    • AdmittedTo in DailyRound
    • Bed in DailyRound
  • Add Beds in Consultation

    • Add the Bed Relation (ConsultationBed Through Table)
  • Switch Beds UI/API

    • API to Switch Beds of a Consultation (can be done with update view?)

Comment thread care/facility/api/serializers/bed.py Outdated

def validate(self, attrs):
user = self.context["request"].user
if "consultation" in attrs and "bed" in attrs:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These are required fields right?


class ConsultationBed(BaseModel):
consultation = models.ForeignKey(PatientConsultation, on_delete=models.PROTECT, null=False, blank=False)
bed = models.ForeignKey(Bed, on_delete=models.PROTECT, null=False, blank=False)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We need a start date and end date for each consultation bed assignment, it should also be helpful if we can have a current bed association from the consultation for ease of queries.
This start and end date would be used to identify when the patient has entered/ exited specific bed types

@vigneshhari
Copy link
Copy Markdown
Member

Switching beds should be done in the POST/Create call for the consultation bed association end point, the backend should also perform the required logic of ending any existing consultation bed associations and moving any current pointers to the consultation bed model.

@vigneshhari vigneshhari changed the base branch from master to bed-revision-1 April 14, 2022 15:49
@vigneshhari vigneshhari marked this pull request as ready for review April 14, 2022 15:49
@vigneshhari vigneshhari requested a review from a team as a code owner April 14, 2022 15:49
@vigneshhari vigneshhari merged commit 268991e into ohcnetwork:bed-revision-1 Apr 14, 2022
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