Example #1
0
    def compare_str(self):
        """Generates a string representation of the instance safe to
        use in comparisons w/ similar types.  (i.e. HL7_Dx and
        Diagnosis)

        """
        return stringFields((self.dx_code, self.dx_type))
Example #2
0
    def compare_str(self):
        """Generates a string representation of the instance safe to
        use in comparisons w/ similar types.  (i.e. HL7_Dx and
        Diagnosis)

        """
        return stringFields((self.dx_code,self.dx_type))
Example #3
0
    def compare_str(self):
        """Generates a string representation of the instance safe to
        use in comparisons w/ similar types. (i.e. HL7_Obr & Obr)

        """
        # When we get a loinc_code, we also get loinc_text - don't
        # need both in comparisons.
        return stringFields((self.loinc_code, self.alt_text))
Example #4
0
    def compare_str(self):
        """Generates a string representation of the instance safe to
        use in comparisons w/ similar types. (i.e. HL7_Obr & Obr)

        """
        # When we get a loinc_code, we also get loinc_text - don't
        # need both in comparisons.
        return stringFields((self.loinc_code, self.alt_text))
Example #5
0
    def compare_str(self):
        """Generates a string representation of the instance safe to
        use in comparisons w/ similar types. (i.e. HL7_Obx & Obx)

        """
        # Boolean logic for the value of hl7_obr_id - its value
        # would naturally be different between the two types.
        return stringFields(
            (self.hl7_obr_id and 't' or 'f', self.value_type,
             self.observation_id, self.observation_text,
             self.observation_result, self.units, self.result_status))
Example #6
0
    def compare_str(self):
        """Generates a string representation of the instance safe to
        use in comparisons w/ similar types. (i.e. HL7_Obx & Obx)

        """
        # Boolean logic for the value of hl7_obr_id - its value
        # would naturally be different between the two types.
        return stringFields((self.hl7_obr_id and 't' or 'f', 
                         self.value_type,
                         self.observation_id,
                         self.observation_text,
                         self.observation_result,
                         self.units,
                         self.result_status)) 
Example #7
0
def test_stringFields():
    assert('' == stringFields((None,)))
    assert('1:2:3:four' == stringFields((1,2,None,3,"four")))
Example #8
0
def test_stringFields():
    assert ('' == stringFields((None, )))
    assert ('1:2:3:four' == stringFields((1, 2, None, 3, "four")))