pub struct BodyObservation {
pub code: String,
pub value_milli: i64,
pub unit: String,
pub instrument: InstrumentKind,
pub at_unix: u32,
pub note: Option<String>,
pub named: Option<String>,
}Expand description
One coded observation about the subject. Integer value + UCUM unit (no float health arithmetic in the record).
Fields§
§code: StringLOINC, UCUM-backed house IRI, or q42: token.
value_milli: i64§unit: StringUCUM or a short token (mm, g, bpm, {named}).
instrument: InstrumentKind§at_unix: u32§note: Option<String>Optional human caption (“left wrist watch”).
named: Option<String>Named value for {named} codes (ethnicity, eye/hair/skin). Integer value_milli stays 0.
Implementations§
Source§impl BodyObservation
impl BodyObservation
Sourcepub fn to_anatomical_record(
&self,
id: impl Into<String>,
subject_uri: impl Into<String>,
scope_domain: impl Into<String>,
) -> Result<AnatomicalObservationRecord, String>
pub fn to_anatomical_record( &self, id: impl Into<String>, subject_uri: impl Into<String>, scope_domain: impl Into<String>, ) -> Result<AnatomicalObservationRecord, String>
Convert a legacy BodyObservation into an AnatomicalObservationRecord
with explicit EpistemicTier, ObservationMethod, ObserverRole, and
TemporalObservationAxis.
Sourcepub fn to_evidenced_assertion(
&self,
id: impl Into<String>,
subject_uri: impl Into<String>,
scope_domain: impl Into<String>,
author_did: &str,
asserted_at_unix: u32,
) -> Result<EvidencedAssertion, String>
pub fn to_evidenced_assertion( &self, id: impl Into<String>, subject_uri: impl Into<String>, scope_domain: impl Into<String>, author_did: &str, asserted_at_unix: u32, ) -> Result<EvidencedAssertion, String>
Bridge directly into a validated EvidencedAssertion.
Trait Implementations§
Source§impl Clone for BodyObservation
impl Clone for BodyObservation
Source§impl Debug for BodyObservation
impl Debug for BodyObservation
Source§impl<'de> Deserialize<'de> for BodyObservation
impl<'de> Deserialize<'de> for BodyObservation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for BodyObservation
Source§impl PartialEq for BodyObservation
impl PartialEq for BodyObservation
Source§impl Serialize for BodyObservation
impl Serialize for BodyObservation
impl StructuralPartialEq for BodyObservation
Auto Trait Implementations§
impl Freeze for BodyObservation
impl RefUnwindSafe for BodyObservation
impl Send for BodyObservation
impl Sync for BodyObservation
impl Unpin for BodyObservation
impl UnsafeUnpin for BodyObservation
impl UnwindSafe for BodyObservation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more