Class: AnalysisSystematicReview::ReferencesBetweenCanonicals
- Inherits:
-
Object
- Object
- AnalysisSystematicReview::ReferencesBetweenCanonicals
- Defined in:
- lib/analysis_systematic_review.rb
Instance Method Summary collapse
- #cited_by(cd_id) ⇒ Object
- #cited_by_rtr(cd_id) ⇒ Object
- #cites(cd_id) ⇒ Object
-
#initialize(sr) ⇒ ReferencesBetweenCanonicals
constructor
A new instance of ReferencesBetweenCanonicals.
Constructor Details
#initialize(sr) ⇒ ReferencesBetweenCanonicals
Returns a new instance of ReferencesBetweenCanonicals.
38 39 40 41 |
# File 'lib/analysis_systematic_review.rb', line 38 def initialize(sr) @sr=sr @rec = @sr.references_bw_canonical end |
Instance Method Details
#cited_by(cd_id) ⇒ Object
47 48 49 |
# File 'lib/analysis_systematic_review.rb', line 47 def cited_by(cd_id) CanonicalDocument.where(:id=>@rec.where(:cd_end=>cd_id).map(:cd_start)) end |
#cited_by_rtr(cd_id) ⇒ Object
51 52 53 54 55 56 |
# File 'lib/analysis_systematic_review.rb', line 51 def cited_by_rtr(cd_id) rta_cd_id=@sr.resolutions_title_abstract.where(:resolution=>'yes').map(:canonical_document_id) cited_by=@rec.where(:cd_end=>cd_id).map(:cd_start) cd_id_final=rta_cd_id & cited_by CanonicalDocument.where(:id=>cd_id_final) end |
#cites(cd_id) ⇒ Object
43 44 45 |
# File 'lib/analysis_systematic_review.rb', line 43 def cites(cd_id) CanonicalDocument.where(:id=>@rec.where(:cd_start=>cd_id).map(:cd_end)) end |