diff --git a/app/models/entities/DrugWarning.scala b/app/models/entities/DrugWarning.scala index 379bc1a8..c955d99f 100644 --- a/app/models/entities/DrugWarning.scala +++ b/app/models/entities/DrugWarning.scala @@ -30,25 +30,8 @@ object DrugWarning extends OTLogging { implicit val getDrugWarningsFromDB: GetResult[DrugWarnings] = GetResult(r => Json.parse(r.<<[String]).as[DrugWarnings]) implicit val drugWarningsImpF: OFormat[DrugWarnings] = Json.format[models.entities.DrugWarnings] - implicit val drugWarningsReferenceImpR: Reads[models.entities.DrugWarningReference] = ( - (JsPath \ "ref_id").read[String] and - (JsPath \ "ref_type").read[String] and - (JsPath \ "ref_url").read[String] - )(DrugWarningReference.apply) - implicit val drugWarningReferenceImpW: OWrites[DrugWarningReference] = - Json.writes[DrugWarningReference] - implicit val drugWarningImpW: OWrites[models.entities.DrugWarning] = Json.writes[DrugWarning] - implicit val drugWarningImpR: Reads[models.entities.DrugWarning] = ( - (JsPath \ "toxicityClass").readNullable[String] and - (JsPath \ "chemblIds").readNullable[Seq[String]] and - (JsPath \ "country").readNullable[String] and - (JsPath \ "description").readNullable[String] and - (JsPath \ "id").readNullable[Long] and - (JsPath \ "references").readNullable[Seq[DrugWarningReference]] and - (JsPath \ "warningType").read[String] and - (JsPath \ "year").readNullable[Int] and - (JsPath \ "efo_term").readNullable[String] and - (JsPath \ "efo_id").readNullable[String] and - (JsPath \ "efo_id_for_warning_class").readNullable[String] - )(DrugWarning.apply) + implicit val drugWarningsReferenceImpF: OFormat[models.entities.DrugWarningReference] = + Json.format[models.entities.DrugWarningReference] + implicit val drugWarningImpF: OFormat[models.entities.DrugWarning] = + Json.format[models.entities.DrugWarning] } diff --git a/app/models/entities/Interactions.scala b/app/models/entities/Interactions.scala index d6e69929..e1c1b72a 100644 --- a/app/models/entities/Interactions.scala +++ b/app/models/entities/Interactions.scala @@ -60,18 +60,10 @@ object Interactions extends OTLogging { GetResult(r => Json.parse(r.<<[String]).as[InteractionResources]) implicit val interactionEvidencePDMF: OFormat[InteractionEvidencePDM] = Json.format[InteractionEvidencePDM] - - implicit val interactionSpeciesW: OWrites[InteractionSpecies] = Json.writes[InteractionSpecies] - implicit val interactionSpeciesR: Reads[InteractionSpecies] = - ((__ \ "mnemonic").read[String] and - (__ \ "scientific_name").readNullable[String] and - (__ \ "taxon_id").readNullable[Long])(InteractionSpecies.apply) - + implicit val interactionSpeciesF: OFormat[InteractionSpecies] = Json.format[InteractionSpecies] implicit val interactionResourcesF: OFormat[InteractionResources] = Json.format[InteractionResources] - implicit val interactionEvidenceF: OFormat[InteractionEvidence] = Json.format[InteractionEvidence] - implicit val interactionF: OFormat[Interaction] = Json.format[Interaction] implicit val interactionsF: OFormat[Interactions] = Json.format[Interactions] } diff --git a/app/models/entities/Target.scala b/app/models/entities/Target.scala index bcd411da..73653381 100644 --- a/app/models/entities/Target.scala +++ b/app/models/entities/Target.scala @@ -73,7 +73,7 @@ case class SafetyLiability( case class CancerHallmark(description: String, impact: Option[String], label: String, pmid: Long) -case class HallmarkAttribute(attribute_name: String, description: String, pmid: Option[Long]) +case class HallmarkAttribute(name: String, description: String, pmid: Option[Long]) case class Hallmarks(cancerHallmarks: Seq[CancerHallmark], attributes: Seq[HallmarkAttribute]) diff --git a/app/models/gql/Objects.scala b/app/models/gql/Objects.scala index d49f0a18..6642dc28 100644 --- a/app/models/gql/Objects.scala +++ b/app/models/gql/Objects.scala @@ -906,8 +906,7 @@ object Objects extends OTLogging { implicit val hallmarksAttributeImp: ObjectType[Backend, HallmarkAttribute] = deriveObjectType[Backend, HallmarkAttribute]( ObjectTypeDescription("Attributes of the hallmark annotation"), - RenameField("attribute_name", "name"), - DocumentField("attribute_name", "Name of the hallmark attribute"), + DocumentField("name", "Name of the hallmark attribute"), DocumentField("description", "Description of the hallmark attribute"), DocumentField( "pmid",