Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated Code Change #354

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from typing import List, Union, cast
from google.protobuf import descriptor
from google.protobuf import message
from google.protobuf import symbol_database
from google.protobuf import message_factory
from absl.testing import parameterized
from google.fhir.core.fhir_path import _evaluation
from google.fhir.core.fhir_path import _fhir_path_data_types
Expand Down Expand Up @@ -67,12 +67,10 @@ def observation_descriptor(self) -> descriptor.Descriptor:
pass

def _new_patient(self):
return symbol_database.Default().GetPrototype(self.patient_descriptor())()
return message_factory.GetMessageClass(self.patient_descriptor())()

def _new_observation(self):
return symbol_database.Default().GetPrototype(
self.observation_descriptor()
)()
return message_factory.GetMessageClass(self.observation_descriptor())()

@abc.abstractmethod
def value_set_builder(self, url: str):
Expand Down
10 changes: 4 additions & 6 deletions google-fhir-views/google/fhir/views/fhir_search_runner_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import pandas as pd

from google.protobuf import symbol_database
from google.protobuf import message_factory
from absl.testing import absltest
from google.fhir.r4.proto.core.resources import bundle_and_contained_resource_pb2
from google.fhir.r4.proto.core.resources import observation_pb2
Expand All @@ -33,17 +33,15 @@
class FhirSearchRunnerTest(absltest.TestCase):

def _new_patient(self):
return symbol_database.Default().GetPrototype(
patient_pb2.Patient.DESCRIPTOR
)()
return message_factory.GetMessageClass(patient_pb2.Patient.DESCRIPTOR)()

def _new_observation(self):
return symbol_database.Default().GetPrototype(
return message_factory.GetMessageClass(
observation_pb2.Observation.DESCRIPTOR
)()

def _new_bundle(self):
return symbol_database.Default().GetPrototype(
return message_factory.GetMessageClass(
bundle_and_contained_resource_pb2.Bundle.DESCRIPTOR
)()

Expand Down
Loading