function unloadReaction() {
  const reaction = new proto.ord.Reaction();
  const identifiers = ord.identifiers.unload();
  reaction.setIdentifiersList(identifiers);

  const inputs = reaction.getInputsMap();
  // isEmptyMessage check occurs in inputs.unload.
  ord.inputs.unload(inputs);

  const setup = ord.setups.unload();
  if (!isEmptyMessage(setup)) {
    reaction.setSetup(setup);
  }

  const conditions = ord.conditions.unload();
  if (!isEmptyMessage(conditions)) {
    reaction.setConditions(conditions);
  }

  const notes = ord.notes.unload();
  if (!isEmptyMessage(notes)) {
    reaction.setNotes(notes);
  }

  const observations = ord.observations.unload();
  reaction.setObservationsList(observations);

  const workups = ord.workups.unload();
  reaction.setWorkupsList(workups);

  const outcomes = ord.outcomes.unload();
  reaction.setOutcomesList(outcomes);

  const provenance = ord.provenance.unload();
  if (!isEmptyMessage(provenance)) {
    reaction.setProvenance(provenance);
  }

  // Setter does nothing when passed an empty string.
  reaction.setReactionId($('#reaction_id').text());
  return reaction;
}
/**
 * Fetches the current reaction from the form.
 * @return {!proto.ord.Reaction}
 */
Fetches the current reaction from the form.
Fetches the current reaction from the form .
function unloadReaction() {
  const reaction = new proto.ord.Reaction();
  const identifiers = ord.identifiers.unload();
  reaction.setIdentifiersList(identifiers);
  const inputs = reaction.getInputsMap();
  ord.inputs.unload(inputs);
  const setup = ord.setups.unload();
  if (!isEmptyMessage(setup)) {
    reaction.setSetup(setup);
  }
  const conditions = ord.conditions.unload();
  if (!isEmptyMessage(conditions)) {
    reaction.setConditions(conditions);
  }
  const notes = ord.notes.unload();
  if (!isEmptyMessage(notes)) {
    reaction.setNotes(notes);
  }
  const observations = ord.observations.unload();
  reaction.setObservationsList(observations);
  const workups = ord.workups.unload();
  reaction.setWorkupsList(workups);
  const outcomes = ord.outcomes.unload();
  reaction.setOutcomesList(outcomes);
  const provenance = ord.provenance.unload();
  if (!isEmptyMessage(provenance)) {
    reaction.setProvenance(provenance);
  }
  reaction.setReactionId($('#reaction_id').text());
  return reaction;
}
function unloadReaction ( ) { const reaction = new proto . ord . Reaction ( ) ; const identifiers = ord . identifiers . unload ( ) ; reaction . setIdentifiersList ( identifiers ) ; const inputs = reaction . getInputsMap ( ) ; ord . inputs . unload ( inputs ) ; const setup = ord . setups . unload ( ) ; if ( ! isEmptyMessage ( setup ) ) { reaction . setSetup ( setup ) ; } const conditions = ord . conditions . unload ( ) ; if ( ! isEmptyMessage ( conditions ) ) { reaction . setConditions ( conditions ) ; } const notes = ord . notes . unload ( ) ; if ( ! isEmptyMessage ( notes ) ) { reaction . setNotes ( notes ) ; } const observations = ord . observations . unload ( ) ; reaction . setObservationsList ( observations ) ; const workups = ord . workups . unload ( ) ; reaction . setWorkupsList ( workups ) ; const outcomes = ord . outcomes . unload ( ) ; reaction . setOutcomesList ( outcomes ) ; const provenance = ord . provenance . unload ( ) ; if ( ! isEmptyMessage ( provenance ) ) { reaction . setProvenance ( provenance ) ; } reaction . setReactionId ( $ ( '#reaction_id' ) . text ( ) ) ; return reaction ; }
Fetches the current reaction from the form.
Fetches the current reaction from the form .
// isEmptyMessage check occurs in inputs.unload. // Setter does nothing when passed an empty string.