@@ -491,8 +491,15 @@ class AnalyzeHealthcareEntitiesResult(DictMixin):
491491 field will contain information about the document payload.
492492 :vartype statistics:
493493 ~azure.ai.textanalytics.TextDocumentStatistics
494+ :ivar fhir_bundle: If `fhir_version` is passed, this will contain a
495+ FHIR compatible object for consumption in other Healthcare tools. For additional
496+ information see https://www.hl7.org/fhir/overview.html.
497+ :vartype fhir_bundle: dict[str, any]
494498 :ivar bool is_error: Boolean check for error item when iterating over list of
495499 results. Always False for an instance of a AnalyzeHealthcareEntitiesResult.
500+
501+ .. versionadded:: 2022-04-01-preview
502+ The *fhir_bundle* property.
496503 """
497504
498505 def __init__ (self , ** kwargs ):
@@ -501,6 +508,7 @@ def __init__(self, **kwargs):
501508 self .entity_relations = kwargs .get ("entity_relations" , None )
502509 self .warnings = kwargs .get ("warnings" , [])
503510 self .statistics = kwargs .get ("statistics" , None )
511+ self .fhir_bundle = kwargs .get ("fhir_bundle" , None )
504512 self .is_error = False
505513
506514 @classmethod
@@ -516,6 +524,8 @@ def _from_generated(cls, healthcare_result):
516524 for r in healthcare_result .relations
517525 ]
518526
527+ fhir_bundle = healthcare_result .fhir_bundle if hasattr (healthcare_result , "fhir_bundle" ) else None
528+
519529 return cls (
520530 id = healthcare_result .id ,
521531 entities = entities ,
@@ -529,17 +539,19 @@ def _from_generated(cls, healthcare_result):
529539 statistics = TextDocumentStatistics ._from_generated ( # pylint: disable=protected-access
530540 healthcare_result .statistics
531541 ),
542+ fhir_bundle = fhir_bundle ,
532543 )
533544
534545 def __repr__ (self ):
535546 return (
536547 "AnalyzeHealthcareEntitiesResult(id={}, entities={}, entity_relations={}, warnings={}, "
537- "statistics={}, is_error={})" .format (
548+ "statistics={}, fhir_bundle={}, is_error={})" .format (
538549 self .id ,
539550 repr (self .entities ),
540551 repr (self .entity_relations ),
541552 repr (self .warnings ),
542553 repr (self .statistics ),
554+ self .fhir_bundle ,
543555 self .is_error ,
544556 )[:1024 ]
545557 )
@@ -2683,3 +2695,74 @@ def _from_generated(cls, result):
26832695 category = result .category ,
26842696 confidence_score = result .confidence_score
26852697 )
2698+
2699+
2700+ class AnalyzeHealthcareEntitiesAction (DictMixin ):
2701+ """AnalyzeHealthcareEntitiesAction encapsulates the parameters for starting a long-running
2702+ healthcare entities analysis operation.
2703+
2704+ If you just want to analyze healthcare entities in a list of documents, and not perform multiple
2705+ long running actions on the input of documents, call method `begin_analyze_healthcare_entities` instead
2706+ of interfacing with this model.
2707+
2708+ :keyword str model_version: The model version to use for the analysis.
2709+ :keyword str string_index_type: Specifies the method used to interpret string offsets.
2710+ `UnicodeCodePoint`, the Python encoding, is the default. To override the Python default,
2711+ you can also pass in `Utf16CodeUnit` or TextElement_v8`. For additional information
2712+ see https://aka.ms/text-analytics-offsets
2713+ :keyword bool disable_service_logs: If set to true, you opt-out of having your text input
2714+ logged on the service side for troubleshooting. By default, Text Analytics logs your
2715+ input text for 48 hours, solely to allow for troubleshooting issues in providing you with
2716+ the Text Analytics natural language processing functions. Setting this parameter to true,
2717+ disables input logging and may limit our ability to remediate issues that occur. Please see
2718+ Cognitive Services Compliance and Privacy notes at https://aka.ms/cs-compliance for
2719+ additional details, and Microsoft Responsible AI principles at
2720+ https://www.microsoft.com/ai/responsible-ai.
2721+ :keyword str fhir_version: The FHIR Spec version that the result will use to format the fhir_bundle
2722+ on the result object. For additional information see https://www.hl7.org/fhir/overview.html.
2723+ The only acceptable values to pass in are None and "4.0.1". The default value is None.
2724+ :ivar str model_version: The model version to use for the analysis.
2725+ :ivar str string_index_type: Specifies the method used to interpret string offsets.
2726+ `UnicodeCodePoint`, the Python encoding, is the default. To override the Python default,
2727+ you can also pass in `Utf16CodeUnit` or TextElement_v8`. For additional information
2728+ see https://aka.ms/text-analytics-offsets
2729+ :ivar bool disable_service_logs: If set to true, you opt-out of having your text input
2730+ logged on the service side for troubleshooting. By default, Text Analytics logs your
2731+ input text for 48 hours, solely to allow for troubleshooting issues in providing you with
2732+ the Text Analytics natural language processing functions. Setting this parameter to true,
2733+ disables input logging and may limit our ability to remediate issues that occur. Please see
2734+ Cognitive Services Compliance and Privacy notes at https://aka.ms/cs-compliance for
2735+ additional details, and Microsoft Responsible AI principles at
2736+ https://www.microsoft.com/ai/responsible-ai.
2737+ :ivar str fhir_version: The FHIR Spec version that the result will use to format the fhir_bundle
2738+ on the result object. For additional information see https://www.hl7.org/fhir/overview.html.
2739+ The only acceptable values to pass in are None and "4.0.1". The default value is None.
2740+ """
2741+
2742+ def __init__ (self , ** kwargs ):
2743+ self .model_version = kwargs .get ("model_version" , None )
2744+ self .string_index_type = kwargs .get ("string_index_type" , "UnicodeCodePoint" )
2745+ self .disable_service_logs = kwargs .get ("disable_service_logs" , None )
2746+ self .fhir_version = kwargs .get ("fhir_version" , None )
2747+
2748+ def __repr__ (self ):
2749+ return (
2750+ "AnalyzeHealthcareEntitiesAction(model_version={}, string_index_type={}, disable_service_logs={}, "
2751+ "fhir_version={})" .format (
2752+ self .model_version ,
2753+ self .string_index_type ,
2754+ self .disable_service_logs ,
2755+ self .fhir_version
2756+ )[:1024 ]
2757+ )
2758+
2759+ def _to_generated (self , api_version , task_id ): # pylint: disable=unused-argument
2760+ return _v2022_04_01_preview_models .HealthcareLROTask (
2761+ task_name = task_id ,
2762+ parameters = _v2022_04_01_preview_models .HealthcareTaskParameters (
2763+ model_version = self .model_version ,
2764+ string_index_type = string_index_type_compatibility (self .string_index_type ),
2765+ logging_opt_out = self .disable_service_logs ,
2766+ fhir_version = self .fhir_version
2767+ )
2768+ )
0 commit comments