Beispiel #1
0
    def search_patient(self, search_term):
        
        self.__person_searcher = gmPersonSearch.cPatientSearcher_SQL()
        # get list of matching ids
        idents = self.__person_searcher.get_identities(search_term)

        if idents is None:
            idents = []

        _log.info("%s matching person(s) found", len(idents))

        # only one matching identity
        if len(idents) == 1:
            self.person = idents[0]
            return jsonclasshintify(self.person)

        # ambiguous - return available choices, to be able to choose from them.
        self.person = None
        return jsonclasshintify(idents)
Beispiel #2
0
 def get_doc_types(self):
     return jsonclasshintify(gmDocuments.get_document_types())
Beispiel #3
0
 def get_documents(self, key):
     doc_folder = gmDocuments.cDocumentFolder(aPKey=key)
     return jsonclasshintify(doc_folder.get_documents())
Beispiel #4
0
 def get_provider_inbox_data(self):
     self.provider = gmStaff.gmCurrentProvider(provider=gmStaff.cStaff())
     inbox = gmProviderInbox.cProviderInbox()
     self.__msgs = inbox.messages
     return jsonclasshintify(inbox.messages)
Beispiel #5
0
 def get_patient_messages(self, pk_patient):
     messages = gmProviderInbox.get_inbox_messages(pk_patient=pk_patient)
     return jsonclasshintify(messages)