Exemplo n.º 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)
Exemplo n.º 2
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)
Exemplo n.º 3
0
 def get_doc_types(self):
     return jsonclasshintify(gmDocuments.get_document_types())
Exemplo n.º 4
0
 def get_documents(self, key):
     doc_folder = gmDocuments.cDocumentFolder(aPKey=key)
     return jsonclasshintify(doc_folder.get_documents())
Exemplo n.º 5
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)
Exemplo n.º 6
0
 def get_patient_messages(self, pk_patient):
     messages = gmProviderInbox.get_inbox_messages(pk_patient=pk_patient)
     return jsonclasshintify(messages)
Exemplo n.º 7
0
 def get_doc_types(self):
     return jsonclasshintify(gmDocuments.get_document_types())
Exemplo n.º 8
0
 def get_documents(self, key):
     doc_folder = gmDocuments.cDocumentFolder(aPKey=key)
     return jsonclasshintify(doc_folder.get_documents())
Exemplo n.º 9
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)
Exemplo n.º 10
0
 def get_patient_messages(self, pk_patient):
     messages = gmProviderInbox.get_inbox_messages(pk_patient=pk_patient)
     return jsonclasshintify(messages)