From https://github.com/farmOS/farm_area/issues/2 :

On the soil test, would it be beneficial to break this down into fields for the test? For instance Umass Amherst soil test has:
Includes pH, acidity, Modified Morgan extractable nutrients (P, K, Ca, Mg, Fe, Mn, Zn, Cu, B), lead, and aluminum, cation exchange capacity, and percent base saturation

This way you could chart the change for a certain nutrient over a defined length of time from a reporting standpoint. The nutrient levels could also we tied to how well the crop did.

My reply:

Yes that is ultimately where I see the Soil Test log type heading. The first pass at it was quite simple, but adding additional fields for specific measurements is a logical next step. Adding the fields is easy. The biggest challenge is on the farmers: they would need to manually input all the data points. But, perhaps in the future, if farmOS gains traction, soil labs can create their own farmOS integration modules that automatically push data to a farmer's farmOS, and auto-fill those fields. This is something I am hoping to explore with my work at the Cornell Soil Health lab. Hopefully it can provide an example that other labs can follow.

Let's use this issue to discuss which common fields should be added...

Comments

m.stenta created an issue. See original summary.

m.stenta’s picture

Issue summary: View changes
BruceDawson’s picture

For the soil tests, I'm thinking that there are several soil tests "out there" (usually one per lab), and it would be good to indicate which one was used. Soil tests will test for different things (N, K, P, ...), and I'm thinking this might be a good use of a taxonomy that's tied to each soil test type (i.e. lab).

m.stenta’s picture

Issue summary: View changes

@BruceDawson - That's a good idea. We already have a field on the soil test log type called "Lab" which you can use to record the lab that you sent it to. Perhaps we should add another field that you can use to specify the test(s) that were requested from that lab?

Currently the "Lab" field is just a simple text field - not a taxonomy reference. But we could consider changing to that (and migrate existing entries into new terms). Let's spin up a new feature request for that specifically...

But yea, in general, I think this feature request (specifically for adding individual fields to record individual measurements) is highly variable, depending on what information each lab collects/provides. We can at least start with some of the most common ones. At some point we will need to draw a line between what fields farmOS will include, and what fields should be provided by other modules, though. This gets a little tricky with the way that Drupal's field system works... it's sort of all-or-nothing. So if another module, for a specific lab, adds fields, ALL soil tests will have those fields available on them - which may not be desirable.

We could potentially consider writing a custom system for providing soil test fields that doesn't use Drupal's field API. We could provide a hook that other modules could use to define different "Types" of soil tests, and the fields that come along with them (with the option of inheriting from other types). These considerations are very similar to those in the Crop Data discussion (allowing crops to have different fields to store data about their growing requirements and what to expect, etc). I have a feeling some of these things will be easier to implement in Drupal 8 with the config management system.

m.stenta’s picture

Project: Farm Soil » farmOS
Component: User interface » Farm Soil

All farmOS repositories have been merged into the farmOS distribution (see #2876992: Merge farmOS repositories into drupal.org/project/farm). I'm going through and moving all open issues from the various project issue queues to the central queue now...

m.stenta’s picture

I am leaning towards the following solution:

1. Add the standard "Quantity Measurement" field to Soil Test Log types
2. Create a "Soil Test Results" quick form that exposes specific fields for all the various data points we might want to collect, and then maps those into quantity measurements on the soil test log that is created.

This provides a nice prescriptive way to collect the data, while still keeping the underlying soil test log type very generalized. And it means that we can leverage general tools like the Quantity Report Generator to analyze trends in the soil test quantity measurements over time.

  • m.stenta committed 6cb3626 on 7.x-1.x
    Issue #2784911: Add quantity fields to soil test logs
    
  • m.stenta committed 81daf61 on 7.x-1.x
    Issue #2784911: Add quantity fields to water test logs
    
m.stenta’s picture

I took the first step on this by adding the standard Quantity Measurements field to Soil and Water test log types. This means it is now possible to store individual soil test measurements in the logs.

But it doesn't provide or enforce any standard list or structure. That is what a quick form can provide. I will leave this issue open for those ideas and next steps...

m.stenta’s picture

In addition to the quick form, it would be great if we could also add the same standard input fields to the Soil Test CSV importer.

m.stenta’s picture

Status: Active » Fixed

I created a new issue specifically for the soil test quick form, so we can close this one: #3152054: Soil test quick form

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.