inferRxNorm method

Future<InferRxNormResponse> inferRxNorm({
  1. required String text,
})

InferRxNorm detects medications as entities listed in a patient record and links to the normalized concept identifiers in the RxNorm database from the National Library of Medicine. Amazon Comprehend Medical only detects medical entities in English language texts.

May throw InternalServerException. May throw ServiceUnavailableException. May throw TooManyRequestsException. May throw InvalidRequestException. May throw InvalidEncodingException. May throw TextSizeLimitExceededException.

Parameter text : The input text used for analysis. The input for InferRxNorm is a string from 1 to 10000 characters.

Implementation

Future<InferRxNormResponse> inferRxNorm({
  required String text,
}) async {
  ArgumentError.checkNotNull(text, 'text');
  _s.validateStringLength(
    'text',
    text,
    1,
    10000,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'ComprehendMedical_20181030.InferRxNorm'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Text': text,
    },
  );

  return InferRxNormResponse.fromJson(jsonResponse.body);
}