• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java MedicationRequest类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.hl7.fhir.dstu3.model.MedicationRequest的典型用法代码示例。如果您正苦于以下问题:Java MedicationRequest类的具体用法?Java MedicationRequest怎么用?Java MedicationRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



MedicationRequest类属于org.hl7.fhir.dstu3.model包,在下文中一共展示了MedicationRequest类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: can_create_cdshooks_card_three_suggestions

import org.hl7.fhir.dstu3.model.MedicationRequest; //导入依赖的package包/类
@Test
public void can_create_cdshooks_card_three_suggestions() throws Exception {
    guidelines = loadSingleGuideline("cdshooks_card_three_suggestions_test.v0.1.gdl2");
    List<Card> cardList = interpreter.executeCdsHooksGuidelines(guidelines, input);
    assertThat(cardList.size(), is(1));
    Card card = cardList.get(0);
    assertThat(card.getSource().getLabel(), is("NICE guideline"));
    assertThat(card.getSource().getUrl().toString(), is("https://www.nice.org.uk/guidance/CG181"));
    assertThat(card.getSuggestions().size(), is(3));
    assertThat(card.getSuggestions().get(0).getLabel(), is("suggestion one"));
    assertThat(card.getSuggestions().get(1).getLabel(), is("suggestion two"));
    assertThat(card.getSuggestions().get(2).getLabel(), is("suggestion three"));

    assertThat(card.getSuggestions().get(0).getActions().size(), is(1));
    assertThat("MedicationRequest expected", card.getSuggestions().get(0).getActions().get(0).getResource() instanceof MedicationRequest);
    assertThat(card.getSuggestions().get(1).getActions().size(), is(1));
    assertThat("Goal expected", card.getSuggestions().get(1).getActions().get(0).getResource() instanceof Goal);
    assertThat(card.getSuggestions().get(2).getActions().size(), is(1));
    assertThat("Appointment expected", card.getSuggestions().get(2).getActions().get(0).getResource() instanceof Appointment);
}
 
开发者ID:gdl-lang,项目名称:gdl2,代码行数:21,代码来源:CreateCdsHooksCardsTest.java


示例2: setUp

import org.hl7.fhir.dstu3.model.MedicationRequest; //导入依赖的package包/类
/**
 * Set up Spark.
 */
@BeforeClass
public static void setUp() {
  spark = SparkSession.builder()
      .master("local[*]")
      .appName("testing")
      .getOrCreate();

  patientDataset = spark.createDataset(ImmutableList.of(patient),
      encoders.of(Patient.class));
  decodedPatient = patientDataset.head();

  conditionsDataset = spark.createDataset(ImmutableList.of(condition),
      encoders.of(Condition.class));
  decodedCondition = conditionsDataset.head();

  observationsDataset = spark.createDataset(ImmutableList.of(observation),
      encoders.of(Observation.class));
  decodedObservation = observationsDataset.head();

  medDataset = spark.createDataset(ImmutableList.of(medRequest),
      encoders.of(MedicationRequest.class));

  decodedMedRequest = medDataset.head();
}
 
开发者ID:cerner,项目名称:bunsen,代码行数:28,代码来源:FhirEncodersTest.java


示例3: validateContextAndPrefetchResources

import org.hl7.fhir.dstu3.model.MedicationRequest; //导入依赖的package包/类
private void validateContextAndPrefetchResources(MedicationRequest prescription) {
    if (!prescription.hasMedication()) {
        throw new RuntimeException("Missing medication code in prescrition " + prescription.getId());
    }

    if (prescription.hasDosageInstruction()) {
        if (!prescription.getDosageInstructionFirstRep().hasAsNeededBooleanType()) {
            throw new RuntimeException("Missing/invalid asNeededBoolean field in dosageInstruction for prescription " + prescription.getId());
        }
        if (!prescription.getDosageInstructionFirstRep().hasDoseSimpleQuantity()) {
            throw new RuntimeException("Missing/invalid doseQuantity field in dosageInstruction for prescription " + prescription.getId());
        }
    }
    else {
        throw new RuntimeException("Missing dosageInstruction structure in prescription " + prescription.getId());
    }
}
 
开发者ID:DBCG,项目名称:cqf-ruler,代码行数:18,代码来源:OpioidGuidanceProcessor.java


示例4: testGenerateMedicationPrescription

import org.hl7.fhir.dstu3.model.MedicationRequest; //导入依赖的package包/类
@Test
@Ignore
public void testGenerateMedicationPrescription() {
	MedicationRequest mp = new MedicationRequest();
	mp.setId("12345");
	Medication med = new Medication();
	med.getCode().setText("ciproflaxin");
	Reference medRef = new Reference(med);
	mp.setMedication(medRef);
	mp.setStatus(MedicationRequestStatus.ACTIVE);
	mp.setAuthoredOnElement(new DateTimeType("2014-09-01"));

	Narrative narrative = new Narrative();
	myGen.generateNarrative(ourCtx, mp, narrative);

	assertTrue("Expected medication name of ciprofloaxin within narrative: " + narrative.getDiv().toString(), narrative.getDiv().toString().indexOf("ciprofloaxin") > -1);
	assertTrue("Expected string status of ACTIVE within narrative: " + narrative.getDiv().toString(), narrative.getDiv().toString().indexOf("ACTIVE") > -1);

}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:20,代码来源:DefaultThymeleafNarrativeGeneratorDstu3Test.java


示例5: assertMedicationRequest

import org.hl7.fhir.dstu3.model.MedicationRequest; //导入依赖的package包/类
private void assertMedicationRequest(Object object, String text, int value) throws Exception {
    assertThat(object, instanceOf(MedicationRequest.class));
    MedicationRequest medicationRequest = (MedicationRequest) object;
    assertThat(medicationRequest.getDosageInstruction().get(0).getText(), is(text));
    assertThat(medicationRequest.getDosageInstruction().get(0).getDoseSimpleQuantity().getValue(),
            is(BigDecimal.valueOf(value)));
}
 
开发者ID:gdl-lang,项目名称:gdl2,代码行数:8,代码来源:CdsHooksGuidelinesTest.java


示例6: can_use_template_create_3_fhir_domain_resources

import org.hl7.fhir.dstu3.model.MedicationRequest; //导入依赖的package包/类
@Test
public void can_use_template_create_3_fhir_domain_resources() throws Exception {
    interpreter = buildInterpreterWithFhirPluginAndCurrentDateTime();
    guideline = loadGuideline("use_template_with_fhir_resources_test.v0.1.gdl2");
    List<Guideline> guidelines = Collections.singletonList(guideline);
    output = interpreter.executeGuidelines(guidelines, input);
    assertTrue(output.get(0).getRoot() instanceof MedicationRequest);
    assertTrue(output.get(1).getRoot() instanceof Goal);
    assertTrue(output.get(2).getRoot() instanceof Appointment);
}
 
开发者ID:gdl-lang,项目名称:gdl2,代码行数:11,代码来源:UseTemplateExpressionTest.java


示例7: search

import org.hl7.fhir.dstu3.model.MedicationRequest; //导入依赖的package包/类
List<MedicationRequest> search(FhirContext ctx,

            @OptionalParam(name = MedicationRequest.SP_PATIENT) ReferenceParam patient
            , @OptionalParam(name = MedicationRequest.SP_CODE) TokenParam code
            , @OptionalParam(name = MedicationRequest.SP_AUTHOREDON) DateRangeParam dateWritten
            , @OptionalParam(name = MedicationRequest.SP_STATUS) TokenParam status
            , @OptionalParam(name = MedicationRequest.SP_IDENTIFIER) TokenParam identifier
            ,@OptionalParam(name= MedicationRequest.SP_RES_ID) TokenParam id

    );
 
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:11,代码来源:MedicationRequestRepository.java


示例8: searchEntity

import org.hl7.fhir.dstu3.model.MedicationRequest; //导入依赖的package包/类
List<MedicationRequestEntity> searchEntity(FhirContext ctx,
        @OptionalParam(name = MedicationRequest.SP_PATIENT) ReferenceParam patient
        , @OptionalParam(name = MedicationRequest.SP_CODE) TokenParam code
        , @OptionalParam(name = MedicationRequest.SP_AUTHOREDON) DateRangeParam dateWritten
        , @OptionalParam(name = MedicationRequest.SP_STATUS) TokenParam status
        , @OptionalParam(name = MedicationRequest.SP_IDENTIFIER) TokenParam identifier
        ,@OptionalParam(name= MedicationRequest.SP_RES_ID) TokenParam id
);
 
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:9,代码来源:MedicationRequestRepository.java


示例9: search

import org.hl7.fhir.dstu3.model.MedicationRequest; //导入依赖的package包/类
@Search
public List<MedicationRequest> search(HttpServletRequest theRequest,
                                      @OptionalParam(name = MedicationRequest.SP_PATIENT) ReferenceParam patient
        , @OptionalParam(name = MedicationRequest.SP_CODE) TokenParam code
        , @OptionalParam(name = MedicationRequest.SP_AUTHOREDON) DateRangeParam dateWritten
        , @OptionalParam(name = MedicationRequest.SP_STATUS) TokenParam status
        , @OptionalParam(name = MedicationRequest.SP_RES_ID) TokenParam resid
        , @OptionalParam(name = MedicationRequest.SP_IDENTIFIER)  TokenParam identifierCode
                                      ) {
    return prescriptionDao.search(ctx,patient, code, dateWritten, status,identifierCode,resid);
}
 
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:12,代码来源:MedicationRequestProvider.java


示例10: get

import org.hl7.fhir.dstu3.model.MedicationRequest; //导入依赖的package包/类
@Read()
public MedicationRequest get(@IdParam IdType prescriptionId) {

    MedicationRequest prescription = prescriptionDao.read(ctx,prescriptionId);

    if ( prescription == null) {
        throw OperationOutcomeFactory.buildOperationOutcomeException(
                new ResourceNotFoundException("No MedicationRequest/ " + prescriptionId.getIdPart()),
                OperationOutcome.IssueSeverity.ERROR, OperationOutcome.IssueType.NOTFOUND);
    }

    return prescription;
}
 
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:14,代码来源:MedicationRequestProvider.java


示例11: getPrescriptionAdapterTarget

import org.hl7.fhir.dstu3.model.MedicationRequest; //导入依赖的package包/类
public qicoremedicationrequestAdapter getPrescriptionAdapterTarget()
{
   if (adaptedClass.getPrescription().getResource() instanceof org.hl7.fhir.dstu3.model.MedicationRequest)
   {
      qicoremedicationrequestAdapter profiledType = new qicoremedicationrequestAdapter();
      profiledType
            .setAdaptee((org.hl7.fhir.dstu3.model.MedicationRequest) adaptedClass
                  .getPrescription().getResource());
      return profiledType;
   }
   else
   {
      return null;
   }
}
 
开发者ID:cqframework,项目名称:qicore_model,代码行数:16,代码来源:qicoremedicationadministrationAdapter.java


示例12: getSubstitution

import org.hl7.fhir.dstu3.model.MedicationRequest; //导入依赖的package包/类
public MedicationRequest.MedicationRequestSubstitutionComponent getSubstitution()
{
   try
   {
      return adaptedClass.getSubstitution();
   }
   catch (Exception e)
   {
      throw new RuntimeException("Error getting Substitution", e);
   }
}
 
开发者ID:cqframework,项目名称:qicore_model,代码行数:12,代码来源:qicoremedicationrequestAdapter.java


示例13: process

import org.hl7.fhir.dstu3.model.MedicationRequest; //导入依赖的package包/类
@Override
public List<CdsCard> process() {

    // validate resources
    validateContextAndPrefetchResources(contextPrescription);
    for (MedicationRequest request : activePrescriptions) {
        validateContextAndPrefetchResources(request);
    }

    // read opioid library
    Library library = getLibraryLoader().load(new org.cqframework.cql.elm.execution.VersionedIdentifier().withId("OpioidCdsStu3").withVersion("0.1.0"));

    // resolve data providers
    // the db file is issued to properly licensed implementers -- see README for more info
    String path = Paths.get("src/main/resources/cds/OpioidManagementTerminologyKnowledge.db").toAbsolutePath().toString().replace("\\", "/");
    String connString = "jdbc:sqlite://" + path;
    OmtkDataProvider omtkProvider = new OmtkDataProvider(connString);
    BaseFhirDataProvider dstu3Provider = new FhirDataProviderStu3().setEndpoint(request.getFhirServerEndpoint());

    Context executionContext = new Context(library);
    executionContext.registerLibraryLoader(getLibraryLoader());
    executionContext.registerDataProvider("http://org.opencds/opioid-cds", omtkProvider);
    executionContext.registerDataProvider("http://hl7.org/fhir", dstu3Provider);
    executionContext.setExpressionCaching(true);
    executionContext.setParameter(null, "Orders", activePrescriptions);

    List<CdsCard> cards = resolveActions(executionContext);
    if (cards.isEmpty() || (cards.size() == 1 && !cards.get(0).hasDetail() && !cards.get(0).hasSummary() && !cards.get(0).hasIndicator())) {
        cards.add(
                new CdsCard()
                        .setSummary("Success")
                        .setDetail("Prescription satisfies recommendation #5 of the cdc opioid guidance.")
                        .setIndicator("info")
        );
    }

    return cards;
}
 
开发者ID:DBCG,项目名称:cqf-ruler,代码行数:39,代码来源:OpioidGuidanceProcessor.java


示例14: getMedicationRequest

import org.hl7.fhir.dstu3.model.MedicationRequest; //导入依赖的package包/类
private MedicationRequest getMedicationRequest(String resourceName, IBaseResource resource) throws FHIRException {
    if (resourceName.equals("MedicationOrder")) {
        MedicationOrder order = (MedicationOrder) resource;
        return Dstu2ToStu3.resolveMedicationRequest(order);
    }

    return (MedicationRequest) resource;
}
 
开发者ID:DBCG,项目名称:cqf-ruler,代码行数:9,代码来源:MedicationPrescribeProcessor.java


示例15: getStatus

import org.hl7.fhir.dstu3.model.MedicationRequest; //导入依赖的package包/类
public MedicationRequest.MedicationRequestStatus getStatus() {
    return status;
}
 
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:4,代码来源:MedicationRequestEntity.java


示例16: setStatus

import org.hl7.fhir.dstu3.model.MedicationRequest; //导入依赖的package包/类
public MedicationRequestEntity setStatus(MedicationRequest.MedicationRequestStatus status) {
    this.status = status;
    return this;
}
 
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:5,代码来源:MedicationRequestEntity.java


示例17: getIntent

import org.hl7.fhir.dstu3.model.MedicationRequest; //导入依赖的package包/类
public MedicationRequest.MedicationRequestIntent getIntent() {
    return intent;
}
 
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:4,代码来源:MedicationRequestEntity.java


示例18: setIntent

import org.hl7.fhir.dstu3.model.MedicationRequest; //导入依赖的package包/类
public MedicationRequestEntity setIntent(MedicationRequest.MedicationRequestIntent intent) {
    this.intent = intent;
    return this;
}
 
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:5,代码来源:MedicationRequestEntity.java


示例19: getPriority

import org.hl7.fhir.dstu3.model.MedicationRequest; //导入依赖的package包/类
public MedicationRequest.MedicationRequestPriority getPriority() {
    return priority;
}
 
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:4,代码来源:MedicationRequestEntity.java


示例20: setPriority

import org.hl7.fhir.dstu3.model.MedicationRequest; //导入依赖的package包/类
public MedicationRequestEntity setPriority(MedicationRequest.MedicationRequestPriority priority) {
    this.priority = priority;
    return this;
}
 
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:5,代码来源:MedicationRequestEntity.java



注:本文中的org.hl7.fhir.dstu3.model.MedicationRequest类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java IntAttribute类代码示例发布时间:2022-05-23
下一篇:
Java ReducerAggStateUpdater类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap