def build_response_service(self, fhir_claim_response):
     service = ClaimResponseItem()
     service.sequenceLinkId = 2
     service_general_adjudication = ClaimResponseItemAdjudication()
     service_general_adjudication.category = ClaimResponseConverter.build_simple_codeable_concept(
         Stu3ClaimConfig.get_fhir_claim_item_general_adjudication_code())
     item_limitation = Money()
     item_limitation.value = self._TEST_SERVICE_LIMITATION_VALUE
     service_general_adjudication.amount = item_limitation
     service_general_adjudication.reason = ClaimResponseConverter \
         .build_codeable_concept(self._TEST_SERVICE_STATUS, Stu3ClaimConfig.get_fhir_claim_item_status_rejected_code())
     service_general_adjudication.value = self._TEST_SERVICE_QUANTITY_APPROVED
     service.adjudication.append(service_general_adjudication)
     item_rejection_adjudication = ClaimResponseItemAdjudication()
     item_rejection_adjudication.category = ClaimResponseConverter.build_simple_codeable_concept(
         Stu3ClaimConfig.
         get_fhir_claim_item_rejected_reason_adjudication_code())
     item_rejection_adjudication.reason = ClaimResponseConverter.build_codeable_concept(
         self._TEST_SERVICE_REJECTED_REASON)
     service.adjudication.append(item_rejection_adjudication)
     service.noteNumber = [2]
     fhir_claim_response.item.append(service)
     item_note = ClaimResponseProcessNote()
     item_note.number = 2
     item_note.text = self._TEST_SERVICE_JUSTIFICATION
     fhir_claim_response.processNote.append(item_note)
 def build_response_item(self, fhir_claim_response):
     item = ClaimResponseItem()
     item.sequenceLinkId = 1
     item_general_adjudication = ClaimResponseItemAdjudication()
     item_general_adjudication.category = ClaimResponseConverter.build_simple_codeable_concept(
         Stu3ClaimConfig.get_fhir_claim_item_general_adjudication_code())
     item_limitation = Money()
     item_limitation.value = self._TEST_ITEM_LIMITATION_VALUE
     item_general_adjudication.amount = item_limitation
     item_general_adjudication.reason = ClaimResponseConverter \
         .build_codeable_concept(self._TEST_ITEM_STATUS, Stu3ClaimConfig.get_fhir_claim_item_status_passed_code())
     item_general_adjudication.value = self._TEST_ITEM_QUANTITY_APPROVED
     item.adjudication.append(item_general_adjudication)
     item_rejection_adjudication = ClaimResponseItemAdjudication()
     item_rejection_adjudication.category = ClaimResponseConverter.build_simple_codeable_concept(
         Stu3ClaimConfig.
         get_fhir_claim_item_rejected_reason_adjudication_code())
     item_rejection_adjudication.reason = ClaimResponseConverter.build_codeable_concept(
         self._TEST_ITEM_REJECTED_REASON)
     item.adjudication.append(item_rejection_adjudication)
     item.noteNumber = [1]
     fhir_claim_response.item.append(item)
     item_note = ClaimResponseProcessNote()
     item_note.number = 1
     item_note.text = self._TEST_ITEM_JUSTIFICATION
     fhir_claim_response.processNote.append(item_note)
Пример #3
0
 def build_process_note(cls, fhir_claim_response, string_value):
     result = None
     if string_value:
         note = ClaimResponseProcessNote()
         note.number = FhirUtils.get_next_array_sequential_id(
             fhir_claim_response.processNote)
         note.text = string_value
         fhir_claim_response.processNote.append(note)
         result = note
     return result