def resolve_summary_page(self, args, *_):
     data = db.query_one(
         "select * from encounter where uuid=(select uuid from (select uuid,MAX(encounter_datetime) from encounter where patient='"
         + self.uuid +
         "' and encounter_type = '8d5b27bc-c2cc-11de-8d13-0010c6dffd0f') A)"
     )
     all_data = Encounter(**data)
     return all_data
 def resolve_most_recent_encounter(self, args, *_):
     data = db.query_one(
         "select * from encounter where uuid=(select uuid from (select uuid,MAX(encounter_datetime) from encounter where patient='"
         + self.uuid + "') A)")
     all_data = Encounter(**data)
     return all_data
 def resolve_encounters(self, args, *_):
     data = db.query("select * from encounter where patient = '" +
                     self.uuid + "'")
     all_data = [Encounter(**d) for d in data]
     return all_data
Exemple #4
0
    def resolve_encounters(self):
        data = db.query("select * from encounter")

        all_data = [Encounter(**d) for d in data]
        return all_data