public EventContext(DvDateTime startTime, DvDateTime endTime, DvCodedText setting, string location, PartyIdentified healthCareFacility, ItemStructure otherContext, Participation[] participations) : this() { Check.Require(startTime != null, "start_time must not be null"); Check.Require(setting != null, "setting must not be null"); this.startTime = startTime; this.endTime = endTime; this.setting = setting; this.location = location; this.healthCareFacility = healthCareFacility; this.otherContext = otherContext; if (this.otherContext != null) { this.otherContext.Parent = this; } if (participations != null) { this.participations = new OpenEhr.AssumedTypes.List <Participation>(participations); } SetAttributeDictionary(); this.CheckInvariants(); }
Composition CreateComposition(Patient patient) { string archetypeNodeId = "openEHR-EHR-COMPOSITION.report-result.v1"; var language = new CodePhrase("en", "ISO_639-1"); var party = new PartyIdentified("Dr. Cristiano"); var context = new EventContext(new DvDateTime(DateTime.Now), null, new DvCodedText("Hospital X", "secondary medical care", "openehr"), null, null, null, null); var content = CreateObservationEcg(patient); var composition = new Composition(new DvText("Result Report"), archetypeNodeId, null, null, GetArchetypeDetails(archetypeNodeId), null, language, language, new DvCodedText("event", "433", "openehr"), context, new ContentItem[1] { content }, party); return(composition); }
Observation CreateObservationEcg(Patient patient) { string archetypeNodeId = "openEHR-EHR-OBSERVATION.ecg_result.v1"; var name = new DvText("ECG result"); var language = new CodePhrase("en", "ISO_639-1"); var encoding = new CodePhrase("UTF-8", "IANA_character-sets"); var party = new PartyIdentified("Dr. Cristiano"); var medicalDevice = CreateClusterMedicalDevice(); var personName = CreateClusterPersonName(patient); var at0102 = new Element(new DvText("Technical quality"), "at0102", null, null, null, null, new DvText("Teste"), null); var at0097 = new Element(new DvText("ECG lead placement"), "at0097", null, null, null, null, new DvText("Teste"), null); var at0025 = new Element(new DvText("QTc algorithm"), "at0025", null, null, null, null, new DvText("Teste"), null); var at0095 = new Element(new DvText("Device interpretation comment"), "at0095", null, null, null, null, new DvText("Teste"), null); var protocol = new ItemTree(new DvText("Tree"), "at0003", null, null, null, null, new Item[6] { medicalDevice, personName, at0102, at0097, at0025, at0095 }); var data = GetHistoryData(); return(new Observation(name, archetypeNodeId, null, null, GetArchetypeDetails(archetypeNodeId), null, language, encoding, party, null, null, null, protocol, null, data, null)); }
public ExtractEntityIdentifier(HierObjectId entityId, PartyIdentified subject) { this.entityId = entityId; this.subject = subject; }
public AuditDetails AuditDetails(string committerName, AuditChangeType changeType) { DesignByContract.Check.Require(!string.IsNullOrEmpty(committerName), "Committer name must not be null or empty"); DvCodedText codedChangeType = DvCodedText(changeType); PartyIdentified committer = new PartyIdentified(committerName); // %HYYKA% //return new Common.Generic.AuditDetails(systemId, changeType, committer); // Expects system ID to be set by server return new AuditDetails(codedChangeType, committer); }
AuditDetails CreateAudition() { var party = new PartyIdentified("Dr. Cristiano", new PartyRef(new HierObjectId("EHR"), "DEMOGRAPHIC", "PERSON")); return(new AuditDetails("CABOLABS_EHR", new DvDateTime(DateTime.Now), new DvCodedText("Creation", "249", "openehr"), party, new DvText("Teste"))); }